提交 89070607 编写于 作者: G ggomez

Add BuildHasher example

上级 e7c822ce
......@@ -234,6 +234,16 @@ pub trait BuildHasher {
type Hasher: Hasher;
/// Creates a new hasher.
///
/// # Examples
///
/// ```
/// use std::collections::hash_map::RandomState;
/// use std::hash::BuildHasher;
///
/// let s = RandomState::new();
/// let new_s = s.build_hasher();
/// ```
#[stable(since = "1.7.0", feature = "build_hasher")]
fn build_hasher(&self) -> Self::Hasher;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册