Skip to content

Commit de00c7a

Browse files
diff_with with FnMut
1 parent 7af0cac commit de00c7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diff.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ where
7777
///
7878
/// If `i` becomes exhausted before `j` becomes exhausted, the number of elements in `i` along with
7979
/// the remaining `j` elements will be returned as `Diff::Longer`.
80-
pub fn diff_with<I, J, F>(i: I, j: J, is_equal: F) -> Option<Diff<I::IntoIter, J::IntoIter>>
80+
pub fn diff_with<I, J, F>(i: I, j: J, mut is_equal: F) -> Option<Diff<I::IntoIter, J::IntoIter>>
8181
where
8282
I: IntoIterator,
8383
J: IntoIterator,
84-
F: Fn(&I::Item, &J::Item) -> bool,
84+
F: FnMut(&I::Item, &J::Item) -> bool,
8585
{
8686
let mut i = i.into_iter();
8787
let mut j = j.into_iter();

0 commit comments

Comments
 (0)