Derive Default implementations wherever possible

This commit is contained in:
Héctor Ramón Jiménez 2025-10-30 23:46:59 +01:00
parent f53bee4225
commit 54239c55ae
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
3 changed files with 10 additions and 21 deletions

View file

@ -1,9 +1,10 @@
use crate::{Point, Size};
/// The position of a window in a given screen.
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Default)]
pub enum Position {
/// The platform-specific default position for a new window.
#[default]
Default,
/// The window is completely centered on the screen.
Centered,
@ -22,9 +23,3 @@ pub enum Position {
/// [`Specific`]: Self::Specific
SpecificWith(fn(Size, Size) -> Point),
}
impl Default for Position {
fn default() -> Self {
Self::Default
}
}