Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jofas committed Dec 15, 2022
1 parent 35773bc commit 63593da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions benches/benches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ fn bench_map_allocation(c: &mut Criterion) {
}
},
COUNT,
))
})
));
});
});
}

Expand Down Expand Up @@ -91,8 +91,8 @@ fn bench_set_allocation(c: &mut Criterion) {
}
},
COUNT,
))
})
));
});
});
}

Expand All @@ -109,8 +109,8 @@ fn bench_vec_no_clone_allocation(c: &mut Criterion) {
]
},
COUNT,
))
})
));
});
});
}

Expand Down
16 changes: 8 additions & 8 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ fn map2() {

#[test]
fn map_e1() {
let _: HashMap<&str, &dyn Debug> = map_e! {
drop::<HashMap<&str, &dyn Debug>>(map_e! {
"en" => &"Hello",
"de" => &"Hallo",
"fr" => &"Bonjour",
"es" => &"Hola",
};
});
}

#[test]
fn map_e2() {
let _: HashMap<&str, &dyn Debug> = map_e! {
drop::<HashMap<&str, &dyn Debug>>(map_e! {
"1" => &Dyn1,
"2" => &Dyn2,
};
});
}

#[test]
Expand Down Expand Up @@ -115,19 +115,19 @@ fn btree_map2() {

#[test]
fn btree_map_e1() {
let _: BTreeMap<u8, &dyn Debug> = btree_map_e! {
drop::<BTreeMap<u8, &dyn Debug>>(btree_map_e! {
0 => &"a",
1 => &"b",
2 => &"c",
};
});
}

#[test]
fn btree_map_e2() {
let _: BTreeMap<&str, &dyn Debug> = btree_map_e! {
drop::<BTreeMap<&str, &dyn Debug>>(btree_map_e! {
"1" => &Dyn1,
"2" => &Dyn2,
};
});
}

#[test]
Expand Down

1 comment on commit 63593da

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 63593da Previous: 35773bc Ratio
map allocation 149050871 ns/iter (± 95058) 152142009 ns/iter (± 44485) 0.98
set allocation 191026300 ns/iter (± 49441) 188860232 ns/iter (± 171967) 1.01
vec_no_clone allocation 1 ns/iter (± 0) 1 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.