Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ModProg committed Nov 5, 2023
1 parent dbaca21 commit 1d7e9ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion example/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused)]
use std::fmt::Debug;

use attribute_derive::{FromAttr, AttributeIdent};
use attribute_derive::{AttributeIdent, FromAttr};
use proc_macro::TokenStream;
use syn::{Block, DeriveInput, Result};

Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,8 @@ pub trait FromAttr: Sized {
{
attrs
.into_iter()
.filter_map(|attr| {
Self::is_ident(attr.path()).then(|| attr.parse_args::<Self::Parser>())
})
.filter(|&attr| Self::is_ident(attr.path()))
.map(|attr| attr.parse_args::<Self::Parser>())
.try_fold(Self::Parser::default(), |mut acc, item| {
acc.try_extend_one(item?)?;
Ok(acc)
Expand Down

0 comments on commit 1d7e9ae

Please sign in to comment.