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

(cherry picked from commit 983828a2a9)

Co-authored-by: steviez <steven@solana.com>
This commit is contained in:
mergify[bot]
2021-05-27 18:58:47 +00:00
committed by GitHub
parent 49402b7d82
commit bd9ce3590d

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)
}