diff --git a/.github/workflows/workspace.yml b/.github/workflows/workspace.yml index 3b289c74..4345345f 100644 --- a/.github/workflows/workspace.yml +++ b/.github/workflows/workspace.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v6 - uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.89 # pinned to prevent breakages when new rust versions are released + toolchain: 1.92 # pinned to prevent breakages when new rust versions are released components: clippy - run: cargo clippy --all-features diff --git a/ssh-key/src/certificate/cert_type.rs b/ssh-key/src/certificate/cert_type.rs index f9d13bf1..b6cc6977 100644 --- a/ssh-key/src/certificate/cert_type.rs +++ b/ssh-key/src/certificate/cert_type.rs @@ -6,8 +6,10 @@ use encoding::{Decode, Encode, Reader, Writer}; /// Types of OpenSSH certificates: user or host. #[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] #[repr(u32)] +#[derive(Default)] pub enum CertType { /// User certificate + #[default] User = 1, /// Host certificate @@ -26,12 +28,6 @@ impl CertType { } } -impl Default for CertType { - fn default() -> Self { - Self::User - } -} - impl Decode for CertType { type Error = Error; diff --git a/ssh-key/src/fingerprint/randomart.rs b/ssh-key/src/fingerprint/randomart.rs index 0879329a..88a40821 100644 --- a/ssh-key/src/fingerprint/randomart.rs +++ b/ssh-key/src/fingerprint/randomart.rs @@ -25,8 +25,6 @@ pub(super) struct Randomart<'a> { impl<'a> Randomart<'a> { /// Create new "randomart" from the given fingerprint. - // TODO: Remove this when the pipeline toolchain is updated beyond 1.69 - #[allow(clippy::arithmetic_side_effects)] pub(super) fn new(header: &'a str, fingerprint: Fingerprint) -> Self { let mut field = Field::default(); let mut x = WIDTH / 2; diff --git a/ssh-key/src/kdf.rs b/ssh-key/src/kdf.rs index dff4472e..de93337c 100644 --- a/ssh-key/src/kdf.rs +++ b/ssh-key/src/kdf.rs @@ -22,8 +22,10 @@ const DEFAULT_SALT_SIZE: usize = 16; /// Key Derivation Functions (KDF). #[derive(Clone, Debug, Eq, PartialEq)] #[non_exhaustive] +#[derive(Default)] pub enum Kdf { /// No KDF. + #[default] None, /// bcrypt-pbkdf options. @@ -124,12 +126,6 @@ impl Kdf { } } -impl Default for Kdf { - fn default() -> Self { - Self::None - } -} - impl Decode for Kdf { type Error = Error;