Return key immediately on insert duplicate value
AbstractiveNord opened this issue · 0 comments
AbstractiveNord commented
use sharded_slab::Slab;
fn main() {
let slab = Slab::new();
let key = slab.insert("hello world").unwrap();
println!("Key : {}!", key);
let key = slab.insert("hello world").unwrap();
println!("Key : {}!", key); // value is present, return already present key instead of new insert result
}