2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(deprecated)]
|
|
|
|
|
2015-08-11 17:27:05 -07:00
|
|
|
use std::hash::{SipHasher, Hasher, Hash};
|
2015-01-14 18:56:17 -05:00
|
|
|
|
|
|
|
#[derive(Hash)]
|
|
|
|
struct Empty;
|
|
|
|
|
|
|
|
pub fn main() {
|
2020-04-30 20:41:51 -04:00
|
|
|
let mut s1 = SipHasher::new();
|
2015-08-11 17:27:05 -07:00
|
|
|
Empty.hash(&mut s1);
|
2020-04-30 20:41:51 -04:00
|
|
|
let mut s2 = SipHasher::new();
|
2015-08-11 17:27:05 -07:00
|
|
|
Empty.hash(&mut s2);
|
|
|
|
assert_eq!(s1.finish(), s2.finish());
|
2015-01-14 18:56:17 -05:00
|
|
|
}
|