remove impossible panickers related to infallible db transaction (#1947)
This commit is contained in:
committed by
Gav Wood
parent
108024e98d
commit
57dbdaada9
@@ -75,7 +75,7 @@ impl Batch {
|
||||
let transaction = DBTransaction::new(dest);
|
||||
|
||||
for keypair in &self.inner {
|
||||
try!(transaction.put(self.column, &keypair.0, &keypair.1).map_err(Error::Custom));
|
||||
transaction.put(self.column, &keypair.0, &keypair.1);
|
||||
}
|
||||
|
||||
self.inner.clear();
|
||||
|
||||
@@ -37,7 +37,7 @@ fn make_db(path: &Path, pairs: BTreeMap<Vec<u8>, Vec<u8>>) {
|
||||
{
|
||||
let transaction = db.transaction();
|
||||
for (k, v) in pairs {
|
||||
transaction.put(None, &k, &v).expect("failed to add pair to transaction");
|
||||
transaction.put(None, &k, &v);
|
||||
}
|
||||
|
||||
db.write(transaction).expect("failed to write db transaction");
|
||||
|
||||
Reference in New Issue
Block a user