[perf] std: add missing `#[inline]` to `DefaultHasher::{new,default}`.

This commit is contained in:
Eduard-Mihai Burtescu 2022-06-13 18:33:02 +00:00
parent 303ab3465c
commit a4f1331b9d
1 changed files with 2 additions and 0 deletions

View File

@ -3140,6 +3140,7 @@ impl DefaultHasher {
/// `DefaultHasher` instances, but is the same as all other `DefaultHasher`
/// instances created through `new` or `default`.
#[stable(feature = "hashmap_default_hasher", since = "1.13.0")]
#[inline]
#[allow(deprecated)]
#[must_use]
pub fn new() -> DefaultHasher {
@ -3153,6 +3154,7 @@ impl Default for DefaultHasher {
/// See its documentation for more.
///
/// [`new`]: DefaultHasher::new
#[inline]
fn default() -> DefaultHasher {
DefaultHasher::new()
}