File tree 4 files changed +9
-17
lines changed
4 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " signifix"
3
3
version = " 0.10.0"
4
+ edition = " 2018"
4
5
authors = [
5
6
" Rouven Spreckels <[email protected] >" ,
6
7
]
@@ -34,4 +35,4 @@ include = [
34
35
travis-ci = { repository = " qu1x/signifix" }
35
36
36
37
[dependencies ]
37
- err-derive = " 0.1 "
38
+ err-derive = " 0.2 "
Original file line number Diff line number Diff line change 6
6
//
7
7
// DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
8
8
9
+ use err_derive:: Error ;
10
+
9
11
use std:: convert:: TryFrom ;
10
12
11
13
use std:: result;
Original file line number Diff line number Diff line change 369
369
370
370
#![ deny( missing_docs) ]
371
371
372
- #[ macro_use]
373
- extern crate err_derive;
372
+ use err_derive:: Error ;
374
373
375
374
use std:: result;
376
375
@@ -451,23 +450,11 @@ pub mod binary;
451
450
pub enum Error {
452
451
/// A given number is not representable with any metric prefix.
453
452
#[ error( display = "Not representable with any metric prefix" ) ]
454
- Metric ( #[ cause ] metric:: Error ) ,
453
+ Metric ( #[ source ] metric:: Error ) ,
455
454
456
455
/// A given number is not representable with any binary prefix.
457
456
#[ error( display = "Not representable with any binary prefix" ) ]
458
- Binary ( #[ cause] binary:: Error ) ,
459
- }
460
-
461
- impl From < metric:: Error > for Error {
462
- fn from ( error : metric:: Error ) -> Self {
463
- Error :: Metric ( error)
464
- }
465
- }
466
-
467
- impl From < binary:: Error > for Error {
468
- fn from ( error : binary:: Error ) -> Self {
469
- Error :: Binary ( error)
470
- }
457
+ Binary ( #[ source] binary:: Error ) ,
471
458
}
472
459
473
460
/// The canonical `Result` type using this crate's `Error` type.
Original file line number Diff line number Diff line change 6
6
//
7
7
// DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
8
8
9
+ use err_derive:: Error ;
10
+
9
11
use std:: convert:: TryFrom ;
10
12
11
13
use std:: result;
You can’t perform that action at this time.
0 commit comments