Fix clippy lints for Rust 1.68

This commit is contained in:
Héctor Ramón Jiménez 2023-03-14 11:11:17 +01:00
parent 8f14b448d2
commit 1816c985fa
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
7 changed files with 18 additions and 54 deletions

View file

@ -1,10 +1,11 @@
/// A font.
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Default)]
pub enum Font {
/// The default font.
///
/// This is normally a font configured in a renderer or loaded from the
/// system.
#[default]
Default,
/// An external font.
@ -16,9 +17,3 @@ pub enum Font {
bytes: &'static [u8],
},
}
impl Default for Font {
fn default() -> Font {
Font::Default
}
}

View file

@ -1,7 +1,8 @@
/// The interaction of a mouse cursor.
#[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord)]
#[derive(Debug, Eq, PartialEq, Clone, Copy, PartialOrd, Ord, Default)]
#[allow(missing_docs)]
pub enum Interaction {
#[default]
Idle,
Pointer,
Grab,
@ -12,9 +13,3 @@ pub enum Interaction {
ResizingHorizontally,
ResizingVertically,
}
impl Default for Interaction {
fn default() -> Interaction {
Interaction::Idle
}
}