assert that sled maps are collision free
This commit is contained in:
parent
a58299a0f0
commit
76385e8620
|
@ -244,7 +244,10 @@ impl SledSerialize for sled::transaction::TransactionalTree {
|
|||
{
|
||||
let key_bytes = key.into_ivec();
|
||||
let value_bytes = value.into_ivec();
|
||||
self.insert(key_bytes, value_bytes)?;
|
||||
let previous = self.insert(key_bytes, value_bytes)?;
|
||||
|
||||
assert!(previous.is_none());
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue