From 25c14f677859ae19daed9c43441292d8389f01e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Thompson Date: Sat, 6 Jan 2024 11:47:26 -0500 Subject: [PATCH] clippy --- deku-derive/src/macros/deku_read.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/deku-derive/src/macros/deku_read.rs b/deku-derive/src/macros/deku_read.rs index 4d1c28fe..d5b20d05 100644 --- a/deku-derive/src/macros/deku_read.rs +++ b/deku-derive/src/macros/deku_read.rs @@ -4,7 +4,6 @@ use darling::ast::{Data, Fields}; use darling::ToTokens; use proc_macro2::TokenStream; use quote::quote; -use syn::spanned::Spanned; use crate::macros::{ gen_ctx_types_and_arg, gen_field_args, gen_internal_field_ident, gen_internal_field_idents, @@ -397,11 +396,7 @@ fn emit_enum(input: &DekuData) -> Result { let deku_id_type = if let Some(id_type) = id_type { Some(quote! {#id_type}) } else if let (Some(ctx), Some(id)) = (input.ctx.as_ref(), input.id.as_ref()) { - if let Some(r) = gen_type_from_ctx_id(ctx, id) { - Some(r) - } else { - None - } + gen_type_from_ctx_id(ctx, id) } else { None };