Remove redundant copy from RocksDB get_cf() wrapper (#17529)

This commit is contained in:
steviez 2021-05-27 10:53:51 -05:00 committed by GitHub
parent 8eab0e8602
commit 983828a2a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ impl Rocks {
}
fn get_cf(&self, cf: &ColumnFamily, key: &[u8]) -> Result<Option<Vec<u8>>> {
let opt = self.0.get_cf(cf, key)?.map(|db_vec| db_vec.to_vec());
let opt = self.0.get_cf(cf, key)?;
Ok(opt)
}