summaryrefslogblamecommitdiffstats
path: root/core/src/hasher.rs
blob: 9d8f75b38cd5771bb6c56df417708a0077ea6d85 (plain) (tree)
1
2
3
4
5
6
7
                                       
                         

                                       

                                       
                            





                             
/// The hasher used to compare layouts.
#[derive(Debug, Default)]
pub struct Hasher(twox_hash::XxHash64);

impl core::hash::Hasher for Hasher {
    fn write(&mut self, bytes: &[u8]) {
        self.0.write(bytes);
    }

    fn finish(&self) -> u64 {
        self.0.finish()
    }
}