Skip to content

Commit

Permalink
more clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Sep 27, 2023
1 parent a153c0a commit 844093c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/yew/src/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ mod test {

#[test]
fn test_reform_ref_mut() {
let callback: CallbackRefMut<usize, ()> = CallbackRefMut::from(|x: &mut usize| *x = *x + 1);
let callback: CallbackRefMut<usize, ()> = CallbackRefMut::from(|x: &mut usize| *x += 1);
let reformed: CallbackRefMut<usize, ()> = callback.reform_ref_mut(|x: &mut usize| {
*x = *x + 2;
*x += 2;
x
});
let mut value: usize = 42;
Expand All @@ -290,10 +290,10 @@ mod test {

#[test]
fn test_filter_reform_ref_mut() {
let callback: CallbackRefMut<usize, ()> = CallbackRefMut::from(|x: &mut usize| *x = *x + 1);
let callback: CallbackRefMut<usize, ()> = CallbackRefMut::from(|x: &mut usize| *x += 1);
let reformed: CallbackRefMut<usize, Option<()>> =
callback.filter_reform_ref_mut(|x: &mut usize| {
*x = *x + 2;
*x += 2;
Some(x)
});
let mut value: usize = 42;
Expand Down

0 comments on commit 844093c

Please sign in to comment.