From c73ab25c9dbe40284cfd38beaf31e2a20a9810de Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 22 Sep 2026 18:22:46 +0200 Subject: refactor(engine): fix portion of clippy lints --- engine/src/windowing/dpi.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'engine/src/windowing/dpi.rs') diff --git a/engine/src/windowing/dpi.rs b/engine/src/windowing/dpi.rs index e3b1be1..9bc42e1 100644 --- a/engine/src/windowing/dpi.rs +++ b/engine/src/windowing/dpi.rs @@ -75,6 +75,12 @@ impl PhysicalPosition } } + /// Attempts to convert the `x` and `y` values in `source` from the type `SourcePixel` + /// to the type `Pixel`. + /// + /// # Errors + /// Returns `Err` if conversion of either `x` or `y` by their respective `TryFrom` + /// implementations fails. pub fn try_convert_from( source: PhysicalPosition, ) -> Result @@ -100,6 +106,12 @@ pub struct LogicalPosition impl LogicalPosition { + /// Attempts to convert the `x` and `y` values in `source` from the type `SourcePixel` + /// to the type `Pixel`. + /// + /// # Errors + /// Returns `Err` if conversion of either `x` or `y` by their respective `TryFrom` + /// implementations fails. pub fn try_convert_from( source: LogicalPosition, ) -> Result @@ -159,6 +171,12 @@ impl PhysicalSize impl PhysicalSize { + /// Attempts to convert the `width` and `height` values in `source` from the type + /// `SourcePixel` to the type `Pixel`. + /// + /// # Errors + /// Returns `Err` if conversion of either `width` or `height` by their respective + /// `TryFrom` implementations fails. pub fn try_convert_from( source: PhysicalSize, ) -> Result @@ -184,6 +202,12 @@ pub struct LogicalSize impl LogicalSize { + /// Attempts to convert the `width` and `height` values in `source` from the type + /// `SourcePixel` to the type `Pixel`. + /// + /// # Errors + /// Returns `Err` if conversion of either `width` or `height` by their respective + /// `TryFrom` implementations fails. pub fn try_convert_from( source: LogicalSize, ) -> Result -- cgit v1.2.3-18-g5258