thaw-ui / thaw

An easy to use leptos component library
https://thawui.vercel.app
MIT License
206 stars 21 forks source link

Use fully qualified syntax in the example of `Drawer` #187

Closed bioinformatist closed 1 month ago

bioinformatist commented 1 month ago

According to https://github.com/rust-lang/rust/issues/48919, a method with this name may be added to the standard library in the future, which may cause ambiguity or even change the behavior. So it would be better to use fully qualified syntax here:

-<Button on_click=Callback::new(move |_| open.call(DrawerPlacement::Top))>"Top"</Button>
+<Button on_click=Callback::new(move |_| leptos::Callable::call(&open, DrawerPlacement::Top))>"Top"</Button>

Also, some clippy lints also have been fixed separately 🍔

luoxiaozero commented 1 month ago

Thank you, and I would like to add that Callback should solve this problem in leptos0.7. https://github.com/leptos-rs/leptos/issues/2142