diff --git a/Cargo.lock b/Cargo.lock index 9e8d5307..9b07a356 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -450,7 +450,7 @@ checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] name = "rasn" -version = "0.3.0-alpha.0" +version = "0.3.0" dependencies = [ "bitvec", "bytes", @@ -468,7 +468,7 @@ dependencies = [ [[package]] name = "rasn-derive" -version = "0.2.1" +version = "0.3.0" dependencies = [ "itertools 0.10.1", "proc-macro2", @@ -478,7 +478,7 @@ dependencies = [ [[package]] name = "rasn-mib" -version = "0.1.0" +version = "0.3.0" dependencies = [ "rasn", "rasn-smi", @@ -486,7 +486,7 @@ dependencies = [ [[package]] name = "rasn-smi" -version = "0.1.0" +version = "0.3.0" dependencies = [ "chrono", "rasn", @@ -495,7 +495,7 @@ dependencies = [ [[package]] name = "rasn-snmp" -version = "0.1.0" +version = "0.3.0" dependencies = [ "rasn", "rasn-smi", diff --git a/Cargo.toml b/Cargo.toml index 07103ef2..064f896f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rasn" -version = "0.3.0-alpha.0" +version = "0.3.0" categories = ["encoding", "no-std", "parser-implementations"] authors = ["Erin Power "] edition = "2018" @@ -39,7 +39,7 @@ num-traits = { version = "0.2.14", default-features = false } snafu = { version = "0.6.10", default-features = false } bytes = { version = "1.0.1", default-features = false } bitvec = { version = "0.22.3", default-features = false, features = ["alloc"] } -rasn-derive = { version = "0.2.0", path = "macros", optional = true } +rasn-derive = { version = "0.3.0", path = "macros", optional = true } chrono = { version = "0.4.19", default-features = false, features = ["alloc"] } static_assertions = "1.1.0" diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 3b65f548..482937c4 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rasn-derive" -version = "0.2.1" +version = "0.3.0" categories = ["encoding", "no-std", "parser-implementations"] authors = ["Erin Power "] edition = "2018" diff --git a/macros/src/config.rs b/macros/src/config.rs index 4608c810..ebce2daa 100644 --- a/macros/src/config.rs +++ b/macros/src/config.rs @@ -232,7 +232,7 @@ impl<'a> FieldConfig<'a> { } else if path.is_ident("default") { default = Some(match item { syn::Meta::List(list) => list.nested.iter().cloned().filter_map(unested_meta).map(|m| m.path().clone()).next(), - _ => panic!("default must provided zero arguments or a path to a function use as a default."), + _ => None }); } } diff --git a/standards/mib/Cargo.toml b/standards/mib/Cargo.toml index 61a9e95f..5a182277 100644 --- a/standards/mib/Cargo.toml +++ b/standards/mib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rasn-mib" -version = "0.1.0" +version = "0.3.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/standards/smi/Cargo.toml b/standards/smi/Cargo.toml index 1dae0c0d..1f1559fb 100644 --- a/standards/smi/Cargo.toml +++ b/standards/smi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rasn-smi" -version = "0.1.0" +version = "0.3.0" authors = ["Erin Power "] edition = "2018" diff --git a/standards/snmp/Cargo.toml b/standards/snmp/Cargo.toml index 95fc3bde..a7ed457f 100644 --- a/standards/snmp/Cargo.toml +++ b/standards/snmp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rasn-snmp" -version = "0.1.0" +version = "0.3.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/tests/derive.rs b/tests/derive.rs index 1b3f6c79..a32fb176 100644 --- a/tests/derive.rs +++ b/tests/derive.rs @@ -103,7 +103,9 @@ fn automatic_tagging() { #[derive(AsnType, Debug, Default, Decode, Encode, PartialEq)] #[rasn(automatic_tagging)] struct Bools { + #[rasn(default)] a: bool, + #[rasn(default)] b: bool, }