Skip to content

Commit fe2fe18

Browse files
committed
learn that 2018 is the future, and yet another unnoticed clippy hint
1 parent 25f150e commit fe2fe18

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "rust_bench_sets_compared"
33
version = "0.1.0"
44
authors = ["Stein Somers <[email protected]>"]
5+
edition = "2018"
56

67
[dev-dependencies]
78
proptest = "0.9"

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn hash_retain(s: &mut HashSet<i32>) -> Option<i32> {
4141
let mut snatched: Option<i32> = None;
4242
s.retain(|elt| match snatched {
4343
None => {
44-
snatched = Some(elt.clone());
44+
snatched = Some(*elt);
4545
false
4646
}
4747
Some(_) => true,

0 commit comments

Comments
 (0)