mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable redundant_closure_for_method_calls lint
This commit is contained in:
parent
a636405bed
commit
96e1877639
37 changed files with 85 additions and 88 deletions
|
|
@ -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| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue