enable redundant_closure_for_method_calls lint

This commit is contained in:
Charles Hall 2024-05-14 18:59:24 -07:00
parent a636405bed
commit 96e1877639
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
37 changed files with 85 additions and 88 deletions

View file

@ -22,7 +22,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>> {
let number = match old.map(|bytes| bytes.try_into()) {
let number = match old.map(TryInto::try_into) {
Some(Ok(bytes)) => {
let number = u64::from_be_bytes(bytes);
number + 1
@ -91,7 +91,7 @@ where
F: Fn(&[u8], &[u8]) -> Ordering,
{
let first_iterator = iterators.next()?;
let mut other_iterators = iterators.map(|i| i.peekable()).collect::<Vec<_>>();
let mut other_iterators = iterators.map(Iterator::peekable).collect::<Vec<_>>();
Some(first_iterator.filter(move |target| {
other_iterators.iter_mut().all(|it| {