Skip to content

Commit

Permalink
Make clippy happy on examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelleyrtp committed Feb 14, 2024
1 parent cfc119c commit cdae3d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/all_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn main() {

fn app() -> Element {
// 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
let mut log_event = move |event: Rc<dyn Debug>| {
Expand Down
2 changes: 1 addition & 1 deletion examples/optional_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct ButtonProps {

type SthElse<T> = Option<T>;

#[allow(non_snake_casea)]
#[allow(non_snake_case)]
fn Button(props: ButtonProps) -> Element {
rsx! {
button {
Expand Down
5 changes: 2 additions & 3 deletions examples/overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
use dioxus::desktop::{
tao::dpi::PhysicalPosition, use_global_shortcut, use_wry_event_handler, LogicalSize,
WindowBuilder,
tao::dpi::PhysicalPosition, use_global_shortcut, LogicalSize, WindowBuilder,
};
use dioxus::prelude::*;

Expand All @@ -18,7 +17,7 @@ fn main() {
fn app() -> Element {
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! {
if show_overlay() {
Expand Down

0 comments on commit cdae3d6

Please sign in to comment.