@@ -51,34 +51,6 @@ pub fn errno() -> i32 {
51
51
}
52
52
53
53
impl Errno {
54
- /// Convert this `Error` to an [`Errno`](enum.Errno.html).
55
- ///
56
- /// # Example
57
- ///
58
- /// ```
59
- /// # use nix::Error;
60
- /// # use nix::errno::Errno;
61
- /// let e = Error::from(Errno::EPERM);
62
- /// assert_eq!(Some(Errno::EPERM), e.as_errno());
63
- /// ```
64
- #[ deprecated( since = "0.22.0" , note = "It's a no-op now; just delete it." ) ]
65
- pub const fn as_errno ( self ) -> Option < Self > {
66
- Some ( self )
67
- }
68
-
69
- /// Create a nix Error from a given errno
70
- #[ deprecated( since = "0.22.0" , note = "It's a no-op now; just delete it." ) ]
71
- #[ allow( clippy:: wrong_self_convention) ] // False positive
72
- pub fn from_errno ( errno : Errno ) -> Error {
73
- errno
74
- }
75
-
76
- /// Create a new invalid argument error (`EINVAL`)
77
- #[ deprecated( since = "0.22.0" , note = "Use Errno::EINVAL instead" ) ]
78
- pub const fn invalid_argument ( ) -> Error {
79
- Errno :: EINVAL
80
- }
81
-
82
54
pub fn last ( ) -> Self {
83
55
last ( )
84
56
}
@@ -105,18 +77,6 @@ impl Errno {
105
77
Ok ( value)
106
78
}
107
79
}
108
-
109
- /// Backwards compatibility hack for Nix <= 0.21.0 users
110
- ///
111
- /// In older versions of Nix, `Error::Sys` was an enum variant. Now it's a
112
- /// function, which is compatible with most of the former use cases of the
113
- /// enum variant. But you should use `Error(Errno::...)` instead.
114
- #[ deprecated( since = "0.22.0" , note = "Use Errno::... instead" ) ]
115
- #[ allow( non_snake_case) ]
116
- #[ inline]
117
- pub const fn Sys ( errno : Errno ) -> Error {
118
- errno
119
- }
120
80
}
121
81
122
82
/// The sentinel value indicates that a function failed and more detailed
@@ -1297,22 +1257,6 @@ mod consts {
1297
1257
EHWPOISON = libc:: EHWPOISON ,
1298
1258
}
1299
1259
1300
- #[ deprecated(
1301
- since = "0.22.1" ,
1302
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
1303
- ) ]
1304
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
1305
- #[ deprecated(
1306
- since = "0.22.1" ,
1307
- note = "use nix::errno::Errno::EDEADLOCK instead"
1308
- ) ]
1309
- pub const EDEADLOCK : Errno = Errno :: EDEADLK ;
1310
- #[ deprecated(
1311
- since = "0.22.1" ,
1312
- note = "use nix::errno::Errno::ENOTSUP instead"
1313
- ) ]
1314
- pub const ENOTSUP : Errno = Errno :: EOPNOTSUPP ;
1315
-
1316
1260
impl Errno {
1317
1261
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
1318
1262
pub const EDEADLOCK : Errno = Errno :: EDEADLK ;
@@ -1576,22 +1520,6 @@ mod consts {
1576
1520
EQFULL = libc:: EQFULL ,
1577
1521
}
1578
1522
1579
- #[ deprecated(
1580
- since = "0.22.1" ,
1581
- note = "use nix::errno::Errno::ELAST instead"
1582
- ) ]
1583
- pub const ELAST : Errno = Errno :: EQFULL ;
1584
- #[ deprecated(
1585
- since = "0.22.1" ,
1586
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
1587
- ) ]
1588
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
1589
- #[ deprecated(
1590
- since = "0.22.1" ,
1591
- note = "use nix::errno::Errno::EDEADLOCK instead"
1592
- ) ]
1593
- pub const EDEADLOCK : Errno = Errno :: EDEADLK ;
1594
-
1595
1523
impl Errno {
1596
1524
pub const ELAST : Errno = Errno :: EQFULL ;
1597
1525
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
@@ -1818,27 +1746,6 @@ mod consts {
1818
1746
EOWNERDEAD = libc:: EOWNERDEAD ,
1819
1747
}
1820
1748
1821
- #[ deprecated(
1822
- since = "0.22.1" ,
1823
- note = "use nix::errno::Errno::ELAST instead"
1824
- ) ]
1825
- pub const ELAST : Errno = Errno :: EOWNERDEAD ;
1826
- #[ deprecated(
1827
- since = "0.22.1" ,
1828
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
1829
- ) ]
1830
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
1831
- #[ deprecated(
1832
- since = "0.22.1" ,
1833
- note = "use nix::errno::Errno::EDEADLOCK instead"
1834
- ) ]
1835
- pub const EDEADLOCK : Errno = Errno :: EDEADLK ;
1836
- #[ deprecated(
1837
- since = "0.22.1" ,
1838
- note = "use nix::errno::Errno::EOPNOTSUPP instead"
1839
- ) ]
1840
- pub const EOPNOTSUPP : Errno = Errno :: ENOTSUP ;
1841
-
1842
1749
impl Errno {
1843
1750
pub const ELAST : Errno = Errno :: EOWNERDEAD ;
1844
1751
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
@@ -2056,27 +1963,6 @@ mod consts {
2056
1963
EASYNC = libc:: EASYNC ,
2057
1964
}
2058
1965
2059
- #[ deprecated(
2060
- since = "0.22.1" ,
2061
- note = "use nix::errno::Errno::ELAST instead"
2062
- ) ]
2063
- pub const ELAST : Errno = Errno :: EASYNC ;
2064
- #[ deprecated(
2065
- since = "0.22.1" ,
2066
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
2067
- ) ]
2068
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2069
- #[ deprecated(
2070
- since = "0.22.1" ,
2071
- note = "use nix::errno::Errno::EDEADLOCK instead"
2072
- ) ]
2073
- pub const EDEADLOCK : Errno = Errno :: EDEADLK ;
2074
- #[ deprecated(
2075
- since = "0.22.1" ,
2076
- note = "use nix::errno::Errno::EOPNOTSUPP instead"
2077
- ) ]
2078
- pub const EOPNOTSUPP : Errno = Errno :: ENOTSUP ;
2079
-
2080
1966
impl Errno {
2081
1967
pub const ELAST : Errno = Errno :: EASYNC ;
2082
1968
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
@@ -2291,17 +2177,6 @@ mod consts {
2291
2177
EPROTO = libc:: EPROTO ,
2292
2178
}
2293
2179
2294
- #[ deprecated(
2295
- since = "0.22.1" ,
2296
- note = "use nix::errno::Errno::ELAST instead"
2297
- ) ]
2298
- pub const ELAST : Errno = Errno :: ENOTSUP ;
2299
- #[ deprecated(
2300
- since = "0.22.1" ,
2301
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
2302
- ) ]
2303
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2304
-
2305
2180
impl Errno {
2306
2181
pub const ELAST : Errno = Errno :: ENOTSUP ;
2307
2182
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
@@ -2516,17 +2391,6 @@ mod consts {
2516
2391
EPROTO = libc:: EPROTO ,
2517
2392
}
2518
2393
2519
- #[ deprecated(
2520
- since = "0.22.1" ,
2521
- note = "use nix::errno::Errno::ELAST instead"
2522
- ) ]
2523
- pub const ELAST : Errno = Errno :: ENOTSUP ;
2524
- #[ deprecated(
2525
- since = "0.22.1" ,
2526
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
2527
- ) ]
2528
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2529
-
2530
2394
impl Errno {
2531
2395
pub const ELAST : Errno = Errno :: ENOTSUP ;
2532
2396
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
@@ -2731,12 +2595,6 @@ mod consts {
2731
2595
EPROTO = libc:: EPROTO ,
2732
2596
}
2733
2597
2734
- #[ deprecated(
2735
- since = "0.22.1" ,
2736
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
2737
- ) ]
2738
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2739
-
2740
2598
impl Errno {
2741
2599
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2742
2600
}
@@ -2965,17 +2823,6 @@ mod consts {
2965
2823
ESTALE = libc:: ESTALE ,
2966
2824
}
2967
2825
2968
- #[ deprecated(
2969
- since = "0.22.1" ,
2970
- note = "use nix::errno::Errno::ELAST instead"
2971
- ) ]
2972
- pub const ELAST : Errno = Errno :: ELAST ;
2973
- #[ deprecated(
2974
- since = "0.22.1" ,
2975
- note = "use nix::errno::Errno::EWOULDBLOCK instead"
2976
- ) ]
2977
- pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
2978
-
2979
2826
impl Errno {
2980
2827
pub const ELAST : Errno = Errno :: ESTALE ;
2981
2828
pub const EWOULDBLOCK : Errno = Errno :: EAGAIN ;
0 commit comments