Skip to content

Commit

Permalink
fix(rust/cbork): Fix cddl_parser library use statements
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj committed Sep 3, 2024
1 parent 2ea888e commit 7caf48a
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct CDDLError(CDDLErrorType);
/// # Examples
///
/// ```rs
/// use cddl_parser::{parse_cddl, Extension};
/// use cbork_cddl_parser::{parse_cddl, Extension};
/// use std:fs;
///
/// let mut input = fs::read_to_string("path/to/your/file.cddl").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/byte_sequences.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cspell: words hexpair rstuvw abcdefghijklmnopqrstuvwyz rstuvw Xhhb Bhcm

use cddl_parser::cddl_test::Rule;
use cbork_cddl_parser::cddl_test::Rule;

mod common;
use common::byte_sequences::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/cddl.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{ffi::OsStr, fs, io::Result};

use cddl_parser::{parse_cddl, Extension};
use cbork_cddl_parser::{parse_cddl, Extension};

#[test]
/// # Panics
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/character_sets.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cspell: words PCHAR pchar BCHAR bchar SESC sesc SCHAR schar fffd fffe

use cddl_parser::{
use cbork_cddl_parser::{
self,
cddl_test::{CDDLTestParser, Parser, Rule},
};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/comments.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cddl_parser::{self, cddl_test::Rule};
use cbork_cddl_parser::{self, cddl_test::Rule};

mod common;
use common::comments::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cddl_parser::{
use cbork_cddl_parser::{
self,
cddl_test::{CDDLTestParser, Parser, Rule},
};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/group_elements.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cspell: words OPTCOM MEMBERKEY bareword tstr GRPENT GRPCHOICE
// cspell: words optcom memberkey grpent grpchoice

use cddl_parser::{self, cddl_test::Rule};
use cbork_cddl_parser::{self, cddl_test::Rule};

mod common;
use common::{group_elements::*, identifiers::*};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/identifiers.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// cspell: words aname groupsocket typesocket groupsocket

use cddl_parser::{
use cbork_cddl_parser::{
self,
cddl_test::{CDDLTestParser, Parser, Rule},
};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/literal_values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use std::ops::Deref;

use cddl_parser::{self, cddl_test::Rule};
use cbork_cddl_parser::{self, cddl_test::Rule};

mod common;
use common::{byte_sequences::*, literal_values::*, text_sequences::*};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/rules.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cspell: words GENERICARG bigfloat ASSIGNG GROUPNAME tstr genericarg GENERICARG
// cspell: words assigng assignt ASSIGNT GENERICPARM genericparm

use cddl_parser::{
use cbork_cddl_parser::{
self,
cddl_test::{CDDLTestParser, Parser, Rule},
};
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/text_sequences.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cddl_parser::{self, cddl_test::Rule};
use cbork_cddl_parser::{self, cddl_test::Rule};

mod common;
use common::text_sequences::*;
Expand Down
2 changes: 1 addition & 1 deletion rust/cbork-cddl-parser/tests/type_declarations.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// cspell: words CTLOP aname groupsocket typesocket RANGEOP tstr ctlop
// cspell: words rangeop RANGEOP

use cddl_parser::{
use cbork_cddl_parser::{
self,
cddl_test::{CDDLTestParser, Parser, Rule},
};
Expand Down
3 changes: 2 additions & 1 deletion rust/cbork/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{path::PathBuf, process::exit};

use clap::Parser;
use console::{style, Emoji};
use cbork_cddl_parser::{parse_cddl, Extension};

/// CDDL linter cli tool
#[derive(Parser)]
Expand Down Expand Up @@ -32,7 +33,7 @@ impl Cli {
/// Check the CDDL file, return any errors
fn check_file(file_path: &PathBuf) -> anyhow::Result<()> {
let mut content = std::fs::read_to_string(file_path)?;
cddl_parser::parse_cddl(&mut content, &cddl_parser::Extension::CDDLParser)?;
parse_cddl(&mut content, &Extension::CDDLParser)?;
Ok(())
}

Expand Down

0 comments on commit 7caf48a

Please sign in to comment.