From 5d8d6be55c91fbe5cc5f4a983a3b665d8860f150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C5=A0pa=C4=8Dek?= Date: Sun, 4 Jun 2023 09:24:30 +0200 Subject: [PATCH] Make clippy happy again --- src/client/negotiate.rs | 7 ++----- src/lib.rs | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/client/negotiate.rs b/src/client/negotiate.rs index 2333f87..a19c836 100644 --- a/src/client/negotiate.rs +++ b/src/client/negotiate.rs @@ -36,8 +36,9 @@ pub(super) struct NegotiateState { done_txs: Vec>>, } -#[derive(Debug, Copy, Clone)] +#[derive(Debug, Default, Copy, Clone)] enum State { + #[default] Idle, KexInit, Kex, @@ -89,10 +90,6 @@ pub(super) fn init_negotiate() -> NegotiateState { NegotiateState { state: State::KexInit, .. NegotiateState::default() } } -impl Default for State { - fn default() -> Self { State::Idle } -} - pub(super) fn init_last_kex() -> LastKex { LastKex { done: false, diff --git a/src/lib.rs b/src/lib.rs index 897ba0d..3c8c086 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ //! - Functions for decoding keys are in the [`keys`] module. //! - Support for the `known_hosts` file is in the [`host_file`] module. //! +#![allow(clippy::box_default)] #![allow(clippy::collapsible_if)] #![allow(clippy::unused_unit)] #![allow(clippy::unit_arg)]