diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 35bc2d5..f24b7d5 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -22,4 +22,4 @@ jobs: run: 'cargo +nightly fmt --all -- --check' - name: 'Clippy' - run: 'cargo clippy -- -D warnings' \ No newline at end of file + run: 'cargo clippy --all-targets --all-features -- -D warnings' \ No newline at end of file diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ce6a5ee..29ad147 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -25,7 +25,7 @@ jobs: run: 'cargo +nightly fmt --all -- --check' - name: 'Clippy' - run: 'cargo clippy --all-features -- -D warnings' + run: 'cargo clippy --all-features --all-targets -- -D warnings' check-examples-matrix: strategy: @@ -47,7 +47,7 @@ jobs: run: 'cd examples/${{ matrix.example }} && cargo +nightly fmt --all -- --check' - name: 'Clippy' - run: 'cd examples/${{ matrix.example }} && cargo clippy -- -D warnings' + run: 'cd examples/${{ matrix.example }} && cargo clippy --all-targets --all-features -- -D warnings' deploy-documentation: name: Deploy documentation diff --git a/examples/basic/src/main.rs b/examples/basic/src/main.rs index c1ab065..6bc6809 100644 --- a/examples/basic/src/main.rs +++ b/examples/basic/src/main.rs @@ -97,7 +97,7 @@ fn inner(props: &InnerProps) -> Html { #[function_component(App)] pub fn app() -> Html { - let component_creator = NotificationFactory::default(); + let component_creator = NotificationFactory; let position = use_state(|| NotificationsPosition::TopRight); let position_setter = position.setter(); diff --git a/examples/custom/src/main.rs b/examples/custom/src/main.rs index 77fff10..6bcf015 100644 --- a/examples/custom/src/main.rs +++ b/examples/custom/src/main.rs @@ -34,7 +34,7 @@ fn inner() -> Html { #[function_component(App)] pub fn app() -> Html { - let component_creator = CustomNotificationFactory::default(); + let component_creator = CustomNotificationFactory; html! {
diff --git a/examples/terminal/src/main.rs b/examples/terminal/src/main.rs index 6855745..9060ca4 100644 --- a/examples/terminal/src/main.rs +++ b/examples/terminal/src/main.rs @@ -45,7 +45,7 @@ fn inner() -> Html { #[function_component(App)] pub fn app() -> Html { - let component_creator = TerminalNotificationFactory::default(); + let component_creator = TerminalNotificationFactory; let position = NotificationsPosition::Custom("terminal-notifications".into()); html! { diff --git a/examples/terminal/src/notification/mod.rs b/examples/terminal/src/notification/mod.rs index 5a77c87..763c66e 100644 --- a/examples/terminal/src/notification/mod.rs +++ b/examples/terminal/src/notification/mod.rs @@ -45,7 +45,7 @@ impl Notifiable for TerminalNotification { } fn apply_tick(&mut self, time: Duration) { - self.lifetime = self.lifetime.checked_sub(time).unwrap_or(Duration::default()); + self.lifetime = self.lifetime.checked_sub(time).unwrap_or_default(); } fn is_alive(&self) -> bool { diff --git a/src/notification/mod.rs b/src/notification/mod.rs index 5fe55c5..9cae6cc 100644 --- a/src/notification/mod.rs +++ b/src/notification/mod.rs @@ -222,7 +222,7 @@ impl Notifiable for Notification { } fn apply_tick(&mut self, time: Duration) { - self.lifetime = self.lifetime.checked_sub(time).unwrap_or(Duration::default()); + self.lifetime = self.lifetime.checked_sub(time).unwrap_or_default(); } fn is_alive(&self) -> bool {