Skip to content

Commit ab9659f

Browse files
committed
Rewrite search_same description
1 parent eef46ac commit ab9659f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

clippy_utils/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,8 +2233,12 @@ pub fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<S
22332233
None
22342234
}
22352235

2236-
/// returns list of all pairs (a, b) from `exprs` such that `eq(a, b)`
2237-
/// `hash` must be comformed with `eq`
2236+
/// Given functions `eq` and `hash` such that `eq(a, b) == true`
2237+
/// implies `hash(a) == hash(b)`
2238+
///
2239+
/// returns list of all pairs `(a, b)` where `eq(a, b) == true`
2240+
/// and `a` is before `b` in `exprs` for all `a` and `b` in
2241+
/// `exprs`
22382242
pub fn search_same<T, Hash, Eq>(exprs: &[T], hash: Hash, eq: Eq) -> Vec<(&T, &T)>
22392243
where
22402244
Hash: Fn(&T) -> u64,

0 commit comments

Comments
 (0)