[librsvg: 2/3] handle: remove has_sub
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/3] handle: remove has_sub
- Date: Wed, 16 Jan 2019 02:30:50 +0000 (UTC)
commit 1d8615f88d4e4887224e275d980313774d40e597
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Jan 15 22:03:55 2019 +0100
handle: remove has_sub
It is only used for the C api and the FIXME there is not useful
since we have to turn it into gboolean anyway
rsvg_internals/src/handle.rs | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 4b4f34ac..cfe8994e 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -483,11 +483,6 @@ impl Handle {
}
}
- fn has_sub(&mut self, name: &str) -> bool {
- // FIXME: return a proper error; only NotFound should map to false
- self.lookup_node(name).is_ok()
- }
-
pub fn render_cairo_sub(
&mut self,
cr: &cairo::Context,
@@ -861,7 +856,7 @@ pub unsafe extern "C" fn rsvg_handle_rust_has_sub(
}
let id: String = from_glib_none(id);
- rhandle.has_sub(&id).to_glib()
+ rhandle.lookup_node(&id).is_ok().to_glib()
}
#[no_mangle]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]