ded805b504
* Prepare to switch Rust import style * Run nightly format Closes #2320 * Clean up a few imports * Enable comment wrapping * Wrap comments
13 lines
368 B
Rust
13 lines
368 B
Rust
// Copyright: Ankitects Pty Ltd and contributors
|
|
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
|
|
use std::collections::hash_map::DefaultHasher;
|
|
use std::hash::Hash;
|
|
use std::hash::Hasher;
|
|
|
|
pub fn simple_hash(hashable: impl Hash) -> u64 {
|
|
let mut hasher = DefaultHasher::new();
|
|
hashable.hash(&mut hasher);
|
|
hasher.finish()
|
|
}
|