Skip to content

Commit

Permalink
Use default() in HashSet::new()
Browse files Browse the repository at this point in the history
  • Loading branch information
twe4ked committed Feb 21, 2020
1 parent 0905e32 commit 9c1f84b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ where
/// let set: HashSet<i32> = HashSet::new();
/// ```
pub fn new() -> Self {
Self {
map: HashMap::default(),
}
Self::default()
}

/// Creates an empty `HashSet` with the specified capacity.
Expand Down

0 comments on commit 9c1f84b

Please sign in to comment.