stable-hash 0.4.3

A stable, structured hash with backward compatibility
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::prelude::*;

impl StableHash for bool {
    #[inline]
    fn stable_hash<H: StableHasher>(&self, field_address: H::Addr, state: &mut H) {
        profile_method!(stable_hash);

        if *self {
            state.write(field_address, &[]);
        }
    }
}