[librsvg: 5/22] handle::acquire_stream() - Removed; inline this one-liner into all callers
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 5/22] handle::acquire_stream() - Removed; inline this one-liner into all callers
- Date: Tue, 8 Jan 2019 17:53:37 +0000 (UTC)
commit 9ef4790fa4708cf30769ff9bdec662a482bad4fe
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Jan 7 18:47:27 2019 -0600
handle::acquire_stream() - Removed; inline this one-liner into all callers
rsvg_internals/src/handle.rs | 9 +--------
rsvg_internals/src/xml.rs | 2 +-
2 files changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/rsvg_internals/src/handle.rs b/rsvg_internals/src/handle.rs
index 72e51d2d..e5c70920 100644
--- a/rsvg_internals/src/handle.rs
+++ b/rsvg_internals/src/handle.rs
@@ -9,7 +9,7 @@ use cairo::{self, ImageSurface, Status};
use cairo_sys;
use gdk_pixbuf::{Colorspace, Pixbuf, PixbufLoader, PixbufLoaderExt};
use gdk_pixbuf_sys;
-use gio::{File as GFile, InputStream};
+use gio::{File as GFile};
use gio_sys;
use glib::translate::*;
use glib_sys;
@@ -605,13 +605,6 @@ pub struct BinaryData {
pub content_type: Option<String>,
}
-pub fn acquire_stream(
- _handle: *mut RsvgHandle,
- aurl: &AllowedUrl,
-) -> Result<InputStream, LoadingError> {
- io::acquire_stream(&aurl, None)
-}
-
pub fn load_image_to_surface(
handle: *mut RsvgHandle,
url: &str,
diff --git a/rsvg_internals/src/xml.rs b/rsvg_internals/src/xml.rs
index 1f5069db..787c0977 100644
--- a/rsvg_internals/src/xml.rs
+++ b/rsvg_internals/src/xml.rs
@@ -477,7 +477,7 @@ impl XmlState {
fn acquire_xml(&mut self, aurl: &AllowedUrl) -> Result<(), AcquireError> {
// FIXME: distinguish between "file not found" and "invalid XML"
- let stream = handle::acquire_stream(self.handle, aurl).map_err(|e| match e {
+ let stream = io::acquire_stream(aurl, None).map_err(|e| match e {
LoadingError::BadDataUrl => AcquireError::FatalError,
_ => AcquireError::ResourceError,
})?;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]