[librsvg: 1/2] Bump minimum Rust version to 1.48




commit 513a575a839342f46bca713ac4eac37fbab9a7b7
Author: Sven Neumann <sven svenfoo org>
Date:   Wed Feb 10 12:14:09 2021 +0100

    Bump minimum Rust version to 1.48
    
    This allows us to simplify some code in rsvg-convert.rs.

 COMPILING.md            |  2 +-
 configure.ac            |  2 +-
 src/bin/rsvg-convert.rs | 18 ++----------------
 3 files changed, 4 insertions(+), 18 deletions(-)
---
diff --git a/COMPILING.md b/COMPILING.md
index a405fa51..a09d1614 100644
--- a/COMPILING.md
+++ b/COMPILING.md
@@ -32,7 +32,7 @@ minimum version is listed here; you may use a newer version instead.
 **Compilers:**
 
 * a C compiler and `make` tool; we recommend GNU `make`.
-* rust 1.42 or later
+* rust 1.48 or later
 * cargo
 
 **Mandatory dependencies:**
diff --git a/configure.ac b/configure.ac
index eee5d77c..1329cc72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -105,7 +105,7 @@ AS_IF(test x$RUSTC = xno,
 dnl Minimum version of rustc that we support
 dnl If you change this, please update COMPILING.md
 MINIMUM_RUST_MAJOR=1
-MINIMUM_RUST_MINOR=42
+MINIMUM_RUST_MINOR=48
 
 rust_version=`$RUSTC --version`
 version=`echo "$rust_version" | sed -e 's/^rustc //g'`
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index c01b594d..2edca13c 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -322,19 +322,11 @@ mod metadata {
     }
 }
 
-// These Stdin and Stdout types can be removed once we depend on Rust 1.48
-
 struct Stdin;
 
 impl Stdin {
     pub fn stream() -> UnixInputStream {
-        unsafe { UnixInputStream::new(Self {}) }
-    }
-}
-
-impl std::os::unix::io::IntoRawFd for Stdin {
-    fn into_raw_fd(self) -> std::os::unix::io::RawFd {
-        0 as std::os::unix::io::RawFd
+        unsafe { UnixInputStream::new(0) }
     }
 }
 
@@ -342,13 +334,7 @@ struct Stdout;
 
 impl Stdout {
     pub fn stream() -> UnixOutputStream {
-        unsafe { UnixOutputStream::new(Self {}) }
-    }
-}
-
-impl std::os::unix::io::IntoRawFd for Stdout {
-    fn into_raw_fd(self) -> std::os::unix::io::RawFd {
-        1 as std::os::unix::io::RawFd
+        unsafe { UnixOutputStream::new(1) }
     }
 }
 


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