diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-05-02 16:36:08 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-05-02 16:36:08 +0100 |
commit | e2cbaf2caf1946dfa527904b7b5095209dd1db9c (patch) | |
tree | ca2c07c637bae98177b5fca406aa0b9c13466f88 /subplotlib-derive | |
parent | 7f44c80302c577f6894cce2c597bec4c8d73891b (diff) | |
download | subplot-e2cbaf2caf1946dfa527904b7b5095209dd1db9c.tar.gz |
chore: Fix up some clippy lints
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'subplotlib-derive')
-rw-r--r-- | subplotlib-derive/src/lib.rs | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/subplotlib-derive/src/lib.rs b/subplotlib-derive/src/lib.rs index e12ae6a..e5b8ab6 100644 --- a/subplotlib-derive/src/lib.rs +++ b/subplotlib-derive/src/lib.rs @@ -148,14 +148,15 @@ fn process_step(mut input: ItemFn) -> proc_macro2::TokenStream { }; let contexttype = if let Some(ty) = input.sig.inputs.first() { - if let FnArg::Typed(pt) = ty { - if let Type::Reference(rt) = &*pt.ty { - *(rt.elem).clone() - } else { - unreachable!() + match ty { + FnArg::Typed(pt) => { + if let Type::Reference(rt) = &*pt.ty { + *(rt.elem).clone() + } else { + unreachable!() + } } - } else { - unreachable!() + _ => unreachable!(), } } else { unreachable!() |