lasso 0.7.3

A multithreaded and single threaded string interner that allows strings to be cached with a minimal memory footprint, associating them with a unique key that can be used to retrieve them at any time.
Documentation
use lasso::Rodeo;
use std::sync::RwLock;

lazy_static::lazy_static! {
    static ref INTERNER: RwLock<Rodeo> = RwLock::new(Rodeo::new());
}

#[test]
fn access_interner() {
    let key = INTERNER
        .write()
        .unwrap()
        .get_or_intern("test strings of things with rings");

    assert_eq!(
        key,
        INTERNER
            .write()
            .unwrap()
            .get_or_intern("test strings of things with rings")
    );
    assert_eq!(
        "test strings of things with rings",
        INTERNER.read().unwrap().resolve(&key)
    );
}