Skip to content

Commit

Permalink
Eliminate unnecessary use of Option
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Dec 8, 2023
1 parent 1b22e4d commit 16c9b22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn map_impl_item_fn(
sig,
block,
);
(parse_quote!( #method ), module)
(parse_quote!( #method ), Some(module))
},
)
}
Expand Down Expand Up @@ -229,7 +229,7 @@ fn map_method_or_fn(
defaultness: &Option<token::Default>,
sig: &Signature,
block: &Block,
) -> (TokenStream2, Option<ItemMod>) {
) -> (TokenStream2, ItemMod) {
let stmts = &block.stmts;

let mut conversions = Conversions::new();
Expand Down Expand Up @@ -734,7 +734,7 @@ fn map_method_or_fn(
#(#stmts)*
}
},
Some(parse_quote! {
parse_quote! {
#mod_attr
mod #mod_ident {
use super::*;
Expand All @@ -750,7 +750,7 @@ fn map_method_or_fn(
#entry_stmts
}
}
}),
},
)
}

Expand Down

0 comments on commit 16c9b22

Please sign in to comment.