Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed Dec 14, 2023
1 parent 247d319 commit eb591f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 8 additions & 2 deletions src/modifiers.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::*;
use accesskit::Role;
use std::marker::PhantomData;
Expand Down Expand Up @@ -56,7 +55,14 @@ pub trait Modifiers: View + Sized {
b: B,
f: F,
) -> Drag<Self, DragFuncS<F, B, T>> {
Drag::new(self, DragFuncS { f, b, phantom: PhantomData::default() })
Drag::new(
self,
DragFuncS {
f,
b,
phantom: PhantomData::default(),
},
)
}

/// Calls a function in response to a mouse hovering.
Expand Down
7 changes: 1 addition & 6 deletions src/views/drag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,7 @@ impl<
button: Option<MouseButton>,
actions: &mut Vec<Box<dyn Any>>,
) {
actions.push(Box::new((self.f)(
self.b.get_mut(cx),
delta,
state,
button,
)))
actions.push(Box::new((self.f)(self.b.get_mut(cx), delta, state, button)))
}
}

Expand Down

0 comments on commit eb591f9

Please sign in to comment.