diff --git a/rust/cbork-cddl-parser/src/lib.rs b/rust/cbork-cddl-parser/src/lib.rs index 2e1b75ec15..af8b4ab29a 100644 --- a/rust/cbork-cddl-parser/src/lib.rs +++ b/rust/cbork-cddl-parser/src/lib.rs @@ -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(); diff --git a/rust/cbork-cddl-parser/tests/byte_sequences.rs b/rust/cbork-cddl-parser/tests/byte_sequences.rs index 5df53da86e..6f5ea02150 100644 --- a/rust/cbork-cddl-parser/tests/byte_sequences.rs +++ b/rust/cbork-cddl-parser/tests/byte_sequences.rs @@ -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::*; diff --git a/rust/cbork-cddl-parser/tests/cddl.rs b/rust/cbork-cddl-parser/tests/cddl.rs index b2e9f525ca..9adc9384de 100644 --- a/rust/cbork-cddl-parser/tests/cddl.rs +++ b/rust/cbork-cddl-parser/tests/cddl.rs @@ -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 diff --git a/rust/cbork-cddl-parser/tests/character_sets.rs b/rust/cbork-cddl-parser/tests/character_sets.rs index 77b4682ecd..46a3e2424a 100644 --- a/rust/cbork-cddl-parser/tests/character_sets.rs +++ b/rust/cbork-cddl-parser/tests/character_sets.rs @@ -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}, }; diff --git a/rust/cbork-cddl-parser/tests/comments.rs b/rust/cbork-cddl-parser/tests/comments.rs index f819072ab0..435ab36338 100644 --- a/rust/cbork-cddl-parser/tests/comments.rs +++ b/rust/cbork-cddl-parser/tests/comments.rs @@ -1,4 +1,4 @@ -use cddl_parser::{self, cddl_test::Rule}; +use cbork_cddl_parser::{self, cddl_test::Rule}; mod common; use common::comments::*; diff --git a/rust/cbork-cddl-parser/tests/common/mod.rs b/rust/cbork-cddl-parser/tests/common/mod.rs index fd6dbb23ec..107a955277 100644 --- a/rust/cbork-cddl-parser/tests/common/mod.rs +++ b/rust/cbork-cddl-parser/tests/common/mod.rs @@ -1,4 +1,4 @@ -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork-cddl-parser/tests/group_elements.rs b/rust/cbork-cddl-parser/tests/group_elements.rs index 0fa4296dec..e735ad1a23 100644 --- a/rust/cbork-cddl-parser/tests/group_elements.rs +++ b/rust/cbork-cddl-parser/tests/group_elements.rs @@ -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::*}; diff --git a/rust/cbork-cddl-parser/tests/identifiers.rs b/rust/cbork-cddl-parser/tests/identifiers.rs index c4f3e7dfa0..63a0c80f07 100644 --- a/rust/cbork-cddl-parser/tests/identifiers.rs +++ b/rust/cbork-cddl-parser/tests/identifiers.rs @@ -1,6 +1,6 @@ // cspell: words aname groupsocket typesocket groupsocket -use cddl_parser::{ +use cbork_cddl_parser::{ self, cddl_test::{CDDLTestParser, Parser, Rule}, }; diff --git a/rust/cbork-cddl-parser/tests/literal_values.rs b/rust/cbork-cddl-parser/tests/literal_values.rs index c29fcedeb7..727dc7fd32 100644 --- a/rust/cbork-cddl-parser/tests/literal_values.rs +++ b/rust/cbork-cddl-parser/tests/literal_values.rs @@ -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::*}; diff --git a/rust/cbork-cddl-parser/tests/rules.rs b/rust/cbork-cddl-parser/tests/rules.rs index 79a999e631..b33b9239e7 100644 --- a/rust/cbork-cddl-parser/tests/rules.rs +++ b/rust/cbork-cddl-parser/tests/rules.rs @@ -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}, }; diff --git a/rust/cbork-cddl-parser/tests/text_sequences.rs b/rust/cbork-cddl-parser/tests/text_sequences.rs index bd96aa6574..4c5270489f 100644 --- a/rust/cbork-cddl-parser/tests/text_sequences.rs +++ b/rust/cbork-cddl-parser/tests/text_sequences.rs @@ -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::*; diff --git a/rust/cbork-cddl-parser/tests/type_declarations.rs b/rust/cbork-cddl-parser/tests/type_declarations.rs index 571b95621f..14f024e14b 100644 --- a/rust/cbork-cddl-parser/tests/type_declarations.rs +++ b/rust/cbork-cddl-parser/tests/type_declarations.rs @@ -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}, }; diff --git a/rust/cbork/src/cli.rs b/rust/cbork/src/cli.rs index bc7f81dd41..4b29f11738 100644 --- a/rust/cbork/src/cli.rs +++ b/rust/cbork/src/cli.rs @@ -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)] @@ -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(()) }