diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 0930e61a..0a82ae79 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -41,7 +41,7 @@ missing_copy_implementations, trivial_casts, trivial_numeric_casts, - //TODO unsafe_code, + unsafe_code, unused_qualifications )] #![warn( diff --git a/lib/src/store/rocksdb.rs b/lib/src/store/rocksdb.rs index 07853736..26fb145c 100644 --- a/lib/src/store/rocksdb.rs +++ b/lib/src/store/rocksdb.rs @@ -141,7 +141,8 @@ impl StrLookup for RocksDbStoreConnection<'_> { .store .db .get_cf(self.id2str_cf, &id.to_le_bytes())? - .map(|v| unsafe { String::from_utf8_unchecked(v) })) + .map(String::from_utf8) + .transpose()?) } }