Skip to content

Commit f735956

Browse files
kdy1Copilot
andauthored
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 1a00ca3 commit f735956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ast_node/src/encoding/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub fn expand(DeriveInput { ident, data, .. }: DeriveInput) -> syn::ItemImpl {
2727
(Some(with_type), false) => syn::parse_quote!(<#with_type<#ty> as cbor4ii::core::dec::Decode<'_>>::decode(reader)?.0),
2828
(None, false) => syn::parse_quote!(<#ty as cbor4ii::core::dec::Decode<'_>>::decode(reader)?),
2929
(None, true) => syn::parse_quote!(<#ty as Default>::default()),
30-
(Some(_), true) => panic!("unsupported with and ignore")
30+
(Some(_), true) => panic!("Cannot use both #[encoding(with)] and #[encoding(ignore)] attributes on the same field")
3131
};
3232

3333
syn::parse_quote!{

0 commit comments

Comments
 (0)