File: nix.diff

package info (click to toggle)
rust-libmount 0.1.15-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 312 kB
  • sloc: makefile: 2
file content (29 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
nix 0.22 deprecated as_errno and made it into a no-op
nix 0.26 removed it.

Index: libmount/Cargo.toml
===================================================================
--- libmount.orig/Cargo.toml
+++ libmount/Cargo.toml
@@ -28,7 +28,7 @@ path = "src/lib.rs"
 version = "0.2.28"
 
 [dependencies.nix]
-version = "0.14"
+version = ">= 0.22, < 1.0"
 
 [dependencies.quick-error]
 version = "2.0"
Index: libmount/src/lib.rs
===================================================================
--- libmount.orig/src/lib.rs
+++ libmount/src/lib.rs
@@ -85,7 +85,7 @@ impl OSError {
     fn from_nix(err: nix::Error, explain: Box<Explainable>) -> OSError {
         OSError(
             MountError::Io(
-                err.as_errno().map_or_else(|| io::Error::new(io::ErrorKind::Other, err), io::Error::from),
+                io::Error::from(err),
             ),
             explain,
         )