Add message if assertion that sled map keys don't collide fails
Co-authored-by: teor <teor@riseup.net>
This commit is contained in:
parent
0cda9039bb
commit
d784a23eab
|
@ -245,7 +245,7 @@ impl SledSerialize for sled::transaction::TransactionalTree {
|
||||||
let value_bytes = value.into_ivec();
|
let value_bytes = value.into_ivec();
|
||||||
let previous = self.insert(key_bytes, value_bytes)?;
|
let previous = self.insert(key_bytes, value_bytes)?;
|
||||||
|
|
||||||
assert!(previous.is_none());
|
assert!(previous.is_none(), format!("state insertion error: duplicate key {:?} when inserting value {:?}", key, value));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue