enable unnecessary_wraps lint

This commit is contained in:
Charles Hall 2024-05-14 19:22:21 -07:00
parent 86218f4771
commit 4e80dc028e
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 7 additions and 8 deletions

View file

@ -21,7 +21,7 @@ pub(crate) fn millis_since_unix_epoch() -> u64 {
}
#[cfg(any(feature = "rocksdb", feature = "sqlite"))]
pub(crate) fn increment(old: Option<&[u8]>) -> Option<Vec<u8>> {
pub(crate) fn increment(old: Option<&[u8]>) -> Vec<u8> {
let number = match old.map(TryInto::try_into) {
Some(Ok(bytes)) => {
let number = u64::from_be_bytes(bytes);
@ -30,7 +30,7 @@ pub(crate) fn increment(old: Option<&[u8]>) -> Option<Vec<u8>> {
_ => 1, // Start at one. since 0 should return the first event in the db
};
Some(number.to_be_bytes().to_vec())
number.to_be_bytes().to_vec()
}
pub(crate) fn generate_keypair() -> Vec<u8> {