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