Use f32 for Padding

This commit is contained in:
Héctor Ramón Jiménez 2023-02-17 16:09:49 +01:00
parent 0872d078e2
commit 3320ac1126
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
12 changed files with 98 additions and 79 deletions

View file

@ -114,10 +114,7 @@ impl Limits {
/// Shrinks the current [`Limits`] to account for the given padding.
pub fn pad(&self, padding: Padding) -> Limits {
self.shrink(Size::new(
padding.horizontal() as f32,
padding.vertical() as f32,
))
self.shrink(Size::new(padding.horizontal(), padding.vertical()))
}
/// Shrinks the current [`Limits`] by the given [`Size`].