fix rocksdb-specific lints

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-02 21:02:29 -05:00 committed by June
parent e2c7afe69c
commit c97483dbd3
2 changed files with 3 additions and 4 deletions

View file

@ -223,7 +223,6 @@ elided_lifetimes_in_paths = "warn"
macro_use_extern_crate = "warn" macro_use_extern_crate = "warn"
single_use_lifetimes = "warn" single_use_lifetimes = "warn"
unsafe_op_in_unsafe_fn = "warn" unsafe_op_in_unsafe_fn = "warn"
unused_tuple_struct_fields = "warn"
# not in rust 1.75.0 (doesn't break CI but won't check for it) # not in rust 1.75.0 (doesn't break CI but won't check for it)
unit_bindings = "warn" unit_bindings = "warn"

View file

@ -208,7 +208,7 @@ impl KvTree for RocksDbEngineTree<'_> {
self.db self.db
.rocks .rocks
.iterator_cf(&self.cf(), rocksdb::IteratorMode::Start) .iterator_cf(&self.cf(), rocksdb::IteratorMode::Start)
.map(|r| r.unwrap()) .map(std::result::Result::unwrap)
.map(|(k, v)| (Vec::from(k), Vec::from(v))), .map(|(k, v)| (Vec::from(k), Vec::from(v))),
) )
} }
@ -232,7 +232,7 @@ impl KvTree for RocksDbEngineTree<'_> {
}, },
), ),
) )
.map(|r| r.unwrap()) .map(std::result::Result::unwrap)
.map(|(k, v)| (Vec::from(k), Vec::from(v))), .map(|(k, v)| (Vec::from(k), Vec::from(v))),
) )
} }
@ -273,7 +273,7 @@ impl KvTree for RocksDbEngineTree<'_> {
&self.cf(), &self.cf(),
rocksdb::IteratorMode::From(&prefix, rocksdb::Direction::Forward), rocksdb::IteratorMode::From(&prefix, rocksdb::Direction::Forward),
) )
.map(|r| r.unwrap()) .map(std::result::Result::unwrap)
.map(|(k, v)| (Vec::from(k), Vec::from(v))) .map(|(k, v)| (Vec::from(k), Vec::from(v)))
.take_while(move |(k, _)| k.starts_with(&prefix)), .take_while(move |(k, _)| k.starts_with(&prefix)),
) )