Skip to content

Commit

Permalink
fix clippy/rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jf2048 committed Sep 22, 2023
1 parent 50670c1 commit 0cf2d6b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions core/parse_meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,22 @@ macro_rules! impl_parse_meta_item_map {

impl_parse_meta_item_collection!(Vec<T>, v, item, v.push(item));
impl_parse_meta_item_set!(BTreeSet<T: Ord>, set, item, set.insert(item));
impl_parse_meta_item_map!(BTreeMap<K: Ord, V>, map, key, value, map.insert(key, value).is_none());
impl_parse_meta_item_map!(
BTreeMap<K: Ord, V>,
map,
key,
value,
map.insert(key, value).is_none()
);
impl_parse_meta_item_collection!(BinaryHeap<T: Ord>, heap, item, heap.push(item));
impl_parse_meta_item_set!(HashSet<T: Hash + Eq>, set, item, set.insert(item));
impl_parse_meta_item_map!(HashMap<K: Hash + Eq, V>, map, key, value, map.insert(key, value).is_none());
impl_parse_meta_item_map!(
HashMap<K: Hash + Eq, V>,
map,
key,
value,
map.insert(key, value).is_none()
);
impl_parse_meta_item_collection!(LinkedList<T>, list, item, list.push_back(item));
impl_parse_meta_item_collection!(VecDeque<T>, v, item, v.push_back(item));

Expand Down
2 changes: 1 addition & 1 deletion macros/types/enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl<'e> ParseAttributes<'e, syn::DeriveInput> for Enum<'e> {
match errors
.push_result(mod_path_vec::parse_meta_item_named(input, path, span))
{
Some(attrs) => attributes.extend(attrs.into_iter()),
Some(attrs) => attributes.extend(attrs),
None => parse_helpers::skip_meta_item(input),
}
}
Expand Down
2 changes: 1 addition & 1 deletion macros/types/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ impl<'s> ParseAttributes<'s, syn::DeriveInput> for Struct<'s> {
match errors
.push_result(mod_path_vec::parse_meta_item_named(input, path, span))
{
Some(attrs) => attributes.extend(attrs.into_iter()),
Some(attrs) => attributes.extend(attrs),
None => parse_helpers::skip_meta_item(input),
}
}
Expand Down

0 comments on commit 0cf2d6b

Please sign in to comment.