Skip to content

Commit a4f1331

Browse files
committed
[perf] std: add missing #[inline] to DefaultHasher::{new,default}.
1 parent 303ab34 commit a4f1331

File tree

1 file changed

+2
-0
lines changed
  • library/std/src/collections/hash

1 file changed

+2
-0
lines changed

library/std/src/collections/hash/map.rs

+2
Original file line numberDiff line numberDiff line change
@@ -3140,6 +3140,7 @@ impl DefaultHasher {
31403140
/// `DefaultHasher` instances, but is the same as all other `DefaultHasher`
31413141
/// instances created through `new` or `default`.
31423142
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
3143+
#[inline]
31433144
#[allow(deprecated)]
31443145
#[must_use]
31453146
pub fn new() -> DefaultHasher {
@@ -3153,6 +3154,7 @@ impl Default for DefaultHasher {
31533154
/// See its documentation for more.
31543155
///
31553156
/// [`new`]: DefaultHasher::new
3157+
#[inline]
31563158
fn default() -> DefaultHasher {
31573159
DefaultHasher::new()
31583160
}

0 commit comments

Comments
 (0)