fix edition 2024 lints
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
cbf207bd1f
commit
a67ab75417
36 changed files with 60 additions and 72 deletions
|
@ -241,7 +241,7 @@ impl<'a, 'de: 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
|
|||
| "Ignore" => self.record_ignore(),
|
||||
| "IgnoreAll" => self.record_ignore_all(),
|
||||
| _ => unhandled!("Unrecognized deserialization Directive {name:?}"),
|
||||
};
|
||||
}
|
||||
|
||||
visitor.visit_unit()
|
||||
}
|
||||
|
|
|
@ -18,5 +18,5 @@ pub(crate) fn handle(level: LogLevel, msg: &str) {
|
|||
| LogLevel::Error | LogLevel::Fatal => error!("{msg}"),
|
||||
| LogLevel::Info => debug!("{msg}"),
|
||||
| LogLevel::Warn => warn!("{msg}"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ pub fn compact_blocking(&self, opts: Options) -> Result {
|
|||
co.set_target_level(level.try_into()?);
|
||||
},
|
||||
| (Some(_), Some(_)) => return Err!("compacting between specific levels not supported"),
|
||||
};
|
||||
}
|
||||
|
||||
self.db
|
||||
.db
|
||||
|
|
|
@ -50,7 +50,6 @@ where
|
|||
.iter()
|
||||
.map(ser::serialize_to::<KeyBuf, _>)
|
||||
.map(|result| result.expect("failed to serialize query key"))
|
||||
.map(Into::into)
|
||||
.collect();
|
||||
|
||||
self.db
|
||||
|
|
|
@ -40,7 +40,7 @@ pub fn rev_raw_stream(self: &Arc<Self>) -> impl Stream<Item = Result<KeyVal<'_>>
|
|||
.into_stream()
|
||||
.flatten()
|
||||
.boxed();
|
||||
};
|
||||
}
|
||||
|
||||
let seek = Seek {
|
||||
map: self.clone(),
|
||||
|
|
|
@ -89,7 +89,7 @@ where
|
|||
.into_stream()
|
||||
.flatten()
|
||||
.boxed();
|
||||
};
|
||||
}
|
||||
|
||||
let seek = Seek {
|
||||
map: self.clone(),
|
||||
|
|
|
@ -39,7 +39,7 @@ pub fn raw_stream(self: &Arc<Self>) -> impl Stream<Item = Result<KeyVal<'_>>> +
|
|||
.into_stream()
|
||||
.flatten()
|
||||
.boxed();
|
||||
};
|
||||
}
|
||||
|
||||
let seek = Seek {
|
||||
map: self.clone(),
|
||||
|
|
|
@ -86,7 +86,7 @@ where
|
|||
.into_stream()
|
||||
.flatten()
|
||||
.boxed();
|
||||
};
|
||||
}
|
||||
|
||||
let seek = Seek {
|
||||
map: self.clone(),
|
||||
|
|
|
@ -146,11 +146,9 @@ pub(crate) fn close(&self) {
|
|||
.map(JoinHandle::join)
|
||||
.map(|result| result.map_err(Error::from_panic))
|
||||
.enumerate()
|
||||
.for_each(|(id, result)| {
|
||||
match result {
|
||||
| Ok(()) => trace!(?id, "worker joined"),
|
||||
| Err(error) => error!(?id, "worker joined with error: {error}"),
|
||||
};
|
||||
.for_each(|(id, result)| match result {
|
||||
| Ok(()) => trace!(?id, "worker joined"),
|
||||
| Err(error) => error!(?id, "worker joined with error: {error}"),
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -345,7 +343,7 @@ fn worker_handle(self: &Arc<Self>, cmd: Cmd) {
|
|||
| Cmd::Get(cmd) if cmd.key.len() == 1 => self.handle_get(cmd),
|
||||
| Cmd::Get(cmd) => self.handle_batch(cmd),
|
||||
| Cmd::Iter(cmd) => self.handle_iter(cmd),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#[implement(Pool)]
|
||||
|
@ -362,7 +360,7 @@ fn handle_iter(&self, mut cmd: Seek) {
|
|||
return;
|
||||
}
|
||||
|
||||
let from = cmd.key.as_deref().map(Into::into);
|
||||
let from = cmd.key.as_deref();
|
||||
|
||||
let result = match cmd.dir {
|
||||
| Direction::Forward => cmd.state.init_fwd(from),
|
||||
|
@ -394,7 +392,7 @@ fn handle_batch(self: &Arc<Self>, mut cmd: Get) {
|
|||
return;
|
||||
}
|
||||
|
||||
let keys = cmd.key.iter().map(Into::into);
|
||||
let keys = cmd.key.iter();
|
||||
|
||||
let result: SmallVec<_> = cmd.map.get_batch_blocking(keys).collect();
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ impl<W: Write> ser::Serializer for &mut Serializer<'_, W> {
|
|||
self.separator()?;
|
||||
},
|
||||
| _ => unhandled!("Unrecognized serialization directive: {name:?}"),
|
||||
};
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
@ -113,13 +113,13 @@ impl<'a> State<'a> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
fn fetch_key(&self) -> Option<Key<'_>> { self.inner.key().map(Key::from) }
|
||||
fn fetch_key(&self) -> Option<Key<'_>> { self.inner.key() }
|
||||
|
||||
#[inline]
|
||||
fn _fetch_val(&self) -> Option<Val<'_>> { self.inner.value().map(Val::from) }
|
||||
fn _fetch_val(&self) -> Option<Val<'_>> { self.inner.value() }
|
||||
|
||||
#[inline]
|
||||
fn fetch(&self) -> Option<KeyVal<'_>> { self.inner.item().map(KeyVal::from) }
|
||||
fn fetch(&self) -> Option<KeyVal<'_>> { self.inner.item() }
|
||||
|
||||
#[inline]
|
||||
pub(super) fn status(&self) -> Option<rocksdb::Error> { self.inner.status().err() }
|
||||
|
|
|
@ -53,6 +53,6 @@ impl Watchers {
|
|||
tx.0.send(()).expect("channel should still be open");
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue