Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Aug 9, 2019
1 parent 12c55b6 commit 1e3806b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub enum DefaultHashBuilder {}

/// A hash map implemented with quadratic probing and SIMD lookup.
///
/// The default hashing algorithm is currently [AHash], though this is
/// The default hashing algorithm is currently [`AHash`], though this is
/// subject to change at any point in the future. This hash function is very
/// fast for all types of keys, but this algorithm will typically *not* protect
/// against attacks such as HashDoS.
Expand Down Expand Up @@ -145,7 +145,7 @@ pub enum DefaultHashBuilder {}
/// [`with_hasher`]: #method.with_hasher
/// [`with_capacity_and_hasher`]: #method.with_capacity_and_hasher
/// [`fnv`]: https://crates.io/crates/fnv
/// [AHash]: https://crates.io/crates/ahash
/// [`AHash`]: https://crates.io/crates/ahash
///
/// ```
/// use hashbrown::HashMap;
Expand Down
8 changes: 4 additions & 4 deletions src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ impl Fallibility {
#[inline]
fn capacity_overflow(self) -> CollectionAllocErr {
match self {
Fallibility::Fallible => CollectionAllocErr::CapacityOverflow,
Fallibility::Infallible => panic!("Hash table capacity overflow"),
Self::Fallible => CollectionAllocErr::CapacityOverflow,
Self::Infallible => panic!("Hash table capacity overflow"),
}
}

/// Error to return on allocation error.
#[inline]
fn alloc_err(self, layout: Layout) -> CollectionAllocErr {
match self {
Fallibility::Fallible => CollectionAllocErr::AllocErr { layout },
Fallibility::Infallible => handle_alloc_error(layout),
Self::Fallible => CollectionAllocErr::AllocErr { layout },
Self::Infallible => handle_alloc_error(layout),
}
}
}
Expand Down

0 comments on commit 1e3806b

Please sign in to comment.