Skip to content

Commit 5876070

Browse files
committed
remove onliner
1 parent 66db6d5 commit 5876070

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

kvdb-rocksdb/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,11 @@ impl MallocSizeOf for DBAndColumns {
236236
fn size_of(&self, ops: &mut parity_util_mem::MallocSizeOfOps) -> usize {
237237
let mut total = self.column_names.size_of(ops)
238238
// we have at least one column always, so we can call property on it
239-
+ self.maybe_property(0, "rocksdb.block-cache-usage").unwrap_or(0);
239+
+ self.db
240+
.property_int_value_cf(self.cf(0), "rocksdb.block-cache-usage")
241+
.unwrap_or(Some(0))
242+
.map(|x| x as usize)
243+
.unwrap_or(0);
240244

241245
for v in 0..self.column_names.len() {
242246
total += self.static_property_or_warn(v, "rocksdb.estimate-table-readers-mem");
@@ -261,10 +265,6 @@ impl DBAndColumns {
261265
}
262266
}
263267
}
264-
265-
fn maybe_property(&self, col: usize, prop: &str) -> Option<usize> {
266-
self.db.property_int_value_cf(self.cf(col), prop).unwrap_or(Some(0)).map(|x| x as usize)
267-
}
268268
}
269269

270270
/// Key-Value database.

0 commit comments

Comments
 (0)