[librsvg: 5/13] Do not manually implement an assign operation
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 5/13] Do not manually implement an assign operation
- Date: Wed, 26 Aug 2020 17:30:41 +0000 (UTC)
commit d87664947b53d77b40429aaaaad606b9cba50e0d
Author: Sven Neumann <sven svenfoo org>
Date: Tue Aug 25 15:32:31 2020 +0200
Do not manually implement an assign operation
See https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
librsvg/pixbuf_utils.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/librsvg/pixbuf_utils.rs b/librsvg/pixbuf_utils.rs
index adeaf825..6e4f1715 100644
--- a/librsvg/pixbuf_utils.rs
+++ b/librsvg/pixbuf_utils.rs
@@ -118,8 +118,8 @@ fn get_final_size(in_width: f64, in_height: f64, size_mode: &SizeMode) -> (f64,
let zoom_y = f64::from(size_mode.height) / out_height;
let zoom = zoom_x.min(zoom_y);
- out_width = zoom * out_width;
- out_height = zoom * out_height;
+ out_width *= zoom;
+ out_height *= zoom;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]