tui-logger 0.18.2

Logger with smart widget for the `ratatui` crate
Documentation
1
2
3
4
5
6
7
8
/// A very simple and fast string hash function, based on the Java String.hashCode() algorithm.
pub fn fast_str_hash(s: &str) -> u64 {
    let mut hash: u64 = 0xdeadbeef;
    for b in s.bytes() {
        hash = hash.wrapping_mul(31).wrapping_add(b as u64);
    }
    hash
}