Skip to content

Commit 525c605

Browse files
har7anjessebraham
authored andcommitted
procmacros: Replace then_some
which was just [recently stabilized in rust 1.62.0][1] and hence raises the MSRV to 1.62.0 for all HALs. Use `bool::then` instead, which takes a closure instead of a parameter but has the same effect otherwise and is available [since rust 1.50.0][2]. [1]: rust-lang/rust#96628 [2]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then
1 parent 601d70d commit 525c605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

esp-hal-procmacros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
225225
};
226226

227227
let context_call =
228-
(f.sig.inputs.len() == 1).then_some(Ident::new("context", proc_macro2::Span::call_site()));
228+
(f.sig.inputs.len() == 1).then(|| Ident::new("context", proc_macro2::Span::call_site()));
229229

230230
quote!(
231231
#(#cfgs)*

0 commit comments

Comments
 (0)