Make clippy happy on examples

This commit is contained in:
Jonathan Kelley committed 2024-02-14 13:50:10 -08:00
1 parent cfc119cce2
commit cdae3d67f7
3 files changed
+4 -5

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ fn main() {
fn app() -> Element { fn app() -> Element {
// Using a VecDeque so its cheap to pop old events off the front // Using a VecDeque so its cheap to pop old events off the front
let mut events = use_signal(|| VecDeque::new()); let mut events = use_signal(VecDeque::new);
// All events and their data implement Debug, so we can re-cast them as Rc<dyn Debug> instead of their specific type // All events and their data implement Debug, so we can re-cast them as Rc<dyn Debug> instead of their specific type
let mut log_event = move |event: Rc<dyn Debug>| { let mut log_event = move |event: Rc<dyn Debug>| {
+1 -1
View File
@@ -58,7 +58,7 @@ struct ButtonProps {
type SthElse<T> = Option<T>; type SthElse<T> = Option<T>;
#[allow(non_snake_casea)] #[allow(non_snake_case)]
fn Button(props: ButtonProps) -> Element { fn Button(props: ButtonProps) -> Element {
rsx! { rsx! {
button { button {
+2 -3
View File
@@ -6,8 +6,7 @@
//! We also add a global shortcut to toggle the overlay on and off, so you could build a raycast-type app with this. //! We also add a global shortcut to toggle the overlay on and off, so you could build a raycast-type app with this.
use dioxus::desktop::{ use dioxus::desktop::{
tao::dpi::PhysicalPosition, use_global_shortcut, use_wry_event_handler, LogicalSize, tao::dpi::PhysicalPosition, use_global_shortcut, LogicalSize, WindowBuilder,
WindowBuilder,
}; };
use dioxus::prelude::*; use dioxus::prelude::*;
@@ -18,7 +17,7 @@ fn main() {
fn app() -> Element { fn app() -> Element {
let mut show_overlay = use_signal(|| true); let mut show_overlay = use_signal(|| true);
use_global_shortcut("cmd+g", move || show_overlay.toggle()); _ = use_global_shortcut("cmd+g", move || show_overlay.toggle());
rsx! { rsx! {
if show_overlay() { if show_overlay() {