[librsvg/rustify-rsvg-convert: 21/41] rsvg-convert: simplify stdin code




commit 87fc670f8f8151aa1e2e5fd93629a645f29730f2
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Jan 9 11:05:24 2021 +0100

    rsvg-convert: simplify stdin code

 src/bin/rsvg-convert/input.rs | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/src/bin/rsvg-convert/input.rs b/src/bin/rsvg-convert/input.rs
index 468dc4f3..2e014288 100644
--- a/src/bin/rsvg-convert/input.rs
+++ b/src/bin/rsvg-convert/input.rs
@@ -3,20 +3,13 @@
 use core::ops::Deref;
 use gio::FileExt;
 use std::fmt;
-use std::os::unix::io::RawFd;
 use std::path::PathBuf;
 
 struct Stdin;
 
 impl Stdin {
     pub fn stream() -> gio::UnixInputStream {
-        unsafe { gio::UnixInputStream::new(Self {}) }
-    }
-}
-
-impl std::os::unix::io::IntoRawFd for Stdin {
-    fn into_raw_fd(self) -> RawFd {
-        0 as RawFd
+        unsafe { gio::UnixInputStream::new(0) }
     }
 }
 


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