File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,4 @@ edition = "2018"
18
18
travis-ci = { repository = " aesedepece/limits-rs" }
19
19
20
20
[dependencies ]
21
- failure = " 0.1.6"
22
- failure_derive = " 0.1.6"
21
+ thiserror = " 1.0"
Original file line number Diff line number Diff line change 7
7
//!
8
8
//! Support for other operating systems and platforms may be added on demand.
9
9
10
- #[ macro_use]
11
- extern crate failure_derive;
10
+ use thiserror:: Error ;
12
11
13
12
// Support for GNU/Linux
14
13
#[ cfg( target_os = "linux" ) ]
@@ -24,12 +23,12 @@ pub use crate::default::*;
24
23
25
24
/// All methods that can fail in this crate should return `Result<_, Error>`. That is, one of the
26
25
/// variants herein.
27
- #[ derive( Debug , Fail ) ]
26
+ #[ derive( Debug , Error ) ]
28
27
pub enum Error {
29
- #[ fail ( display = "Unsupported OS. Could not get process limits." ) ]
28
+ #[ error ( "Unsupported OS. Could not get process limits." ) ]
30
29
UnsupportedOS ,
31
- #[ fail ( display = "Proc file not found at `{}`: {}" , _0 , _1 ) ]
32
- ProcFileNotFound ( String , #[ cause ] std:: io:: Error ) ,
30
+ #[ error ( "Proc file not found at `{}`: {}" , . 0 , . 1 ) ]
31
+ ProcFileNotFound ( String , #[ source ] std:: io:: Error ) ,
33
32
}
34
33
35
34
/// Get the limits for the process in which we are running (our own process id).
You can’t perform that action at this time.
0 commit comments