Skip to content

Commit 6ddf335

Browse files
authored
Adhere to clippy's demands (#205)
1 parent b199509 commit 6ddf335

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

asn1_derive/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@ fn extract_field_properties(attrs: &[syn::Attribute]) -> (OpType, Option<syn::Li
149149
panic!("Can't specify #[explicit] or #[implicit] more than once")
150150
}
151151
} else if attr.path.is_ident("default") {
152-
if default.is_some() {
153-
panic!("Can't specify #[default] more than once");
154-
}
152+
assert!(default.is_none(), "Can't specify #[default] more than once");
155153
default = Some(attr.parse_args::<syn::Lit>().unwrap());
156154
}
157155
}

0 commit comments

Comments
 (0)