Lines Matching defs:hash

2833     use crate::hash;
2838 assert!(hash(&x) == hash(&y));
2848 assert!(hash(&x) == hash(&y));
5600 use crate::hash;
5613 assert_eq!(hash(&x), hash(&y));
8871 use std::hash::{Hash, Hasher};
8889 fn hash<T: Hash>(t: &T) -> u64 {
8891 t.hash(&mut s);
8900 let ordinary_hash = hash(&5u32);
8903 5u32.hash(&mut hasher_1);
8907 5u32.hash(&mut hasher_2);
11212 use crate::hash;
11788 assert!(hash(&x) == hash(&y));
11793 // test that two deques hash equal even if elements are laid out differently
11804 assert_eq!(hash(&orig), hash(&ring));
16218 use core::hash;
18205 impl hash::Hash for String {
18207 fn hash<H: hash::Hasher>(&self, hasher: &mut H) {
18208 (**self).hash(hasher)
18821 use core::hash::{Hash, Hasher};
19235 fn hash<H: Hasher>(&self, state: &mut H) {
19236 Hash::hash(&**self, state)
19751 use core::hash::{Hash, Hasher};
21182 fn hash<H: Hasher>(&self, state: &mut H) {
21183 (**self).hash(state);
22044 //! [`Hash`]: core::hash::Hash
23282 use core::hash::{Hash, Hasher};
25544 fn hash<H: Hasher>(&self, state: &mut H) {
25545 (**self).hash(state)
26961 use core::hash::{Hash, Hasher};
28706 fn hash<H: Hasher>(&self, state: &mut H) {
28707 self.len().hash(state);
28709 elt.hash(state);
29796 use core::hash::{Hash, Hasher};
31757 fn hash<H: Hasher>(&self, state: &mut H) {
31759 elt.hash(state);
40369 use core::hash::{Hash, Hasher};
43068 fn hash<H: Hasher>(&self, state: &mut H) {
43069 self.len().hash(state);
43076 self.iter().for_each(|elem| elem.hash(state));
44084 // This is a valid, albeit rather bad hash function implementation.
44104 value.hash(&mut hasher);
46867 use core::hash::{Hash, Hasher};
49177 fn hash<H: Hasher>(&self, state: &mut H) {
49178 Hash::hash(&**self, state)
50311 use core::hash::{Hash, Hasher};
51304 fn hash<H: Hasher>(&self, state: &mut H) {
51305 (**self).hash(state);