mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
enable impl_trait_in_params lint
See also <https://github.com/rust-lang/rust-clippy/issues/12792>.
This commit is contained in:
parent
52c2893073
commit
2ded335adb
2 changed files with 10 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ float_cmp_const = "warn"
|
|||
format_push_string = "warn"
|
||||
get_unwrap = "warn"
|
||||
if_then_some_else_none = "warn"
|
||||
impl_trait_in_params = "warn"
|
||||
lossy_float_literal = "warn"
|
||||
mem_forget = "warn"
|
||||
mod_module_files = "warn"
|
||||
|
|
|
|||
13
src/utils.rs
13
src/utils.rs
|
|
@ -81,10 +81,15 @@ pub(crate) fn calculate_hash(keys: &[&[u8]]) -> Vec<u8> {
|
|||
hash.as_ref().to_owned()
|
||||
}
|
||||
|
||||
pub(crate) fn common_elements(
|
||||
mut iterators: impl Iterator<Item = impl Iterator<Item = Vec<u8>>>,
|
||||
check_order: impl Fn(&[u8], &[u8]) -> Ordering,
|
||||
) -> Option<impl Iterator<Item = Vec<u8>>> {
|
||||
pub(crate) fn common_elements<I, F>(
|
||||
mut iterators: I,
|
||||
check_order: F,
|
||||
) -> Option<impl Iterator<Item = Vec<u8>>>
|
||||
where
|
||||
I: Iterator,
|
||||
I::Item: Iterator<Item = Vec<u8>>,
|
||||
F: Fn(&[u8], &[u8]) -> Ordering,
|
||||
{
|
||||
let first_iterator = iterators.next()?;
|
||||
let mut other_iterators = iterators.map(|i| i.peekable()).collect::<Vec<_>>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue