[librsvg/rustify-rsvg-convert: 72/78] Remove legacy_layer_size; use legacy_layer_geometry directly




commit 92c6575d0f8bd0cd5b0de571d7fd8dcdc520dd4f
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Feb 2 10:26:19 2021 -0600

    Remove legacy_layer_size; use legacy_layer_geometry directly

 src/bin/rsvg-convert.rs | 3 ++-
 src/c_api/sizing.rs     | 5 -----
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index ef367b64..a40df856 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -459,7 +459,8 @@ impl Converter {
 
     fn natural_size(&self, renderer: &CairoRenderer, input: &Input) -> Result<Size, Error> {
         let (w, h) = renderer
-            .legacy_layer_size(self.export_id.as_deref())
+            .legacy_layer_geometry(self.export_id.as_deref())
+            .map(|(ink_r, _)| (ink_r.width, ink_r.height))
             .map_err(|e| match e {
                 RenderingError::IdNotFound => error!(
                     "File {} does not have an object with id \"{}\")",
diff --git a/src/c_api/sizing.rs b/src/c_api/sizing.rs
index 238706e9..2c91073b 100644
--- a/src/c_api/sizing.rs
+++ b/src/c_api/sizing.rs
@@ -17,11 +17,6 @@ pub trait LegacySize {
         Ok((ink_r.width, ink_r.height))
     }
 
-    fn legacy_layer_size(&self, id: Option<&str>) -> Result<(f64, f64), RenderingError> {
-        let (ink_r, _) = self.legacy_layer_geometry(id)?;
-        Ok((ink_r.width, ink_r.height))
-    }
-
     fn legacy_layer_geometry(
         &self,
         id: Option<&str>,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]