From 5b44502632a849cd59ca0f63d4545ba4ff1492b0 Mon Sep 17 00:00:00 2001 From: Yuri6037 Date: Sun, 24 Oct 2021 20:27:38 +0200 Subject: [PATCH] Update src/geometry/scale.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplified code. Co-authored-by: Sébastien Crozet --- src/geometry/scale.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/geometry/scale.rs b/src/geometry/scale.rs index 23e46373..33a6bf3a 100755 --- a/src/geometry/scale.rs +++ b/src/geometry/scale.rs @@ -369,10 +369,7 @@ impl Scale #[inline] #[must_use] pub fn try_inverse_transform_point(&self, pt: &Point) -> Option> { - if let Some(s) = self.try_inverse() { - return Some(s * pt); - } - return None; + self.try_inverse().map(|s| s * pt) } }