bruh rust analyzer sucks
This commit is contained in:
@@ -5,12 +5,11 @@ pub trait Sensable<W, Ctx, Tag> {
|
||||
self,
|
||||
sense: Sense,
|
||||
// trait copied here bc rust analyzer skill issue
|
||||
f: impl FnMut(&mut Ui<Ctx>, &mut Ctx) + 'static + Clone,
|
||||
f: impl SenseFn<Ctx>,
|
||||
) -> impl WidgetIdFn<W, Ctx>;
|
||||
fn id_on(
|
||||
self,
|
||||
sense: Sense,
|
||||
// trait copied here bc rust analyzer skill issue
|
||||
f: impl FnMut(&WidgetId<W>, &mut Ui<Ctx>, &mut Ctx) + 'static + Clone,
|
||||
) -> impl WidgetIdFn<W, Ctx>
|
||||
where
|
||||
@@ -18,7 +17,6 @@ pub trait Sensable<W, Ctx, Tag> {
|
||||
fn edit_on(
|
||||
self,
|
||||
sense: Sense,
|
||||
// trait copied here bc rust analyzer skill issue
|
||||
f: impl FnMut(&mut W, &mut Ctx) + 'static + Clone,
|
||||
) -> impl WidgetIdFn<W, Ctx>
|
||||
where
|
||||
@@ -26,7 +24,7 @@ pub trait Sensable<W, Ctx, Tag> {
|
||||
}
|
||||
|
||||
impl<W: WidgetLike<Ctx, Tag>, Ctx, Tag> Sensable<W::Widget, Ctx, Tag> for W {
|
||||
fn on(self, sense: Sense, f: impl SenseFn<Ctx> + Clone) -> impl WidgetIdFn<W::Widget, Ctx> {
|
||||
fn on(self, sense: Sense, f: impl SenseFn<Ctx>) -> impl WidgetIdFn<W::Widget, Ctx> {
|
||||
move |ui| {
|
||||
let id = self.add(ui);
|
||||
ui.add_sensor(
|
||||
|
||||
Reference in New Issue
Block a user