[librsvg: 30/53] Use struct update syntax to build CairoRenderer
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 30/53] Use struct update syntax to build CairoRenderer
- Date: Fri, 23 Oct 2020 02:19:07 +0000 (UTC)
commit 9292cc8be6477a0426d32f293292697ff6fc20b5
Author: Sven Neumann <sven svenfoo org>
Date: Sat Oct 17 10:24:21 2020 +0200
Use struct update syntax to build CairoRenderer
librsvg_crate/src/lib.rs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/librsvg_crate/src/lib.rs b/librsvg_crate/src/lib.rs
index 5424d437..b9294e65 100644
--- a/librsvg_crate/src/lib.rs
+++ b/librsvg_crate/src/lib.rs
@@ -448,9 +448,8 @@ impl<'a> CairoRenderer<'a> {
assert!(dpi_y > 0.0);
CairoRenderer {
- handle: self.handle,
dpi: Dpi::new(dpi_x, dpi_y),
- is_testing: self.is_testing,
+ ..self
}
}
@@ -624,9 +623,8 @@ impl<'a> CairoRenderer<'a> {
/// Turns on test mode. Do not use this function; it is for librsvg's test suite only.
pub fn test_mode(self) -> Self {
CairoRenderer {
- handle: self.handle,
- dpi: self.dpi,
is_testing: true,
+ ..self
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]