Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sharksforarms committed Jan 6, 2024
1 parent 2286c2b commit 25c14f6
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions deku-derive/src/macros/deku_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -397,11 +396,7 @@ fn emit_enum(input: &DekuData) -> Result<TokenStream, syn::Error> {
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
};
Expand Down

0 comments on commit 25c14f6

Please sign in to comment.