File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use crate::{
17
17
#[ derive( Debug , Error ) ]
18
18
pub enum NormalizeError {
19
19
#[ error( "I/O error" ) ]
20
- Io ( #[ source ] io:: Error ) ,
20
+ Io ( #[ from ] io:: Error ) ,
21
21
#[ error( "could not open file: {1}" ) ]
22
22
OpenFile ( #[ source] io:: Error , PathBuf ) ,
23
23
#[ error( "invalid counts" ) ]
58
58
59
59
info ! ( normalization_method = ?method, "normalizing counts" ) ;
60
60
61
- let lengths = calculate_feature_lengths ( & features, & names) . map_err ( NormalizeError :: Io ) ?;
61
+ let lengths = calculate_feature_lengths ( & features, & names) ?;
62
62
63
63
let normalized_counts = match method {
64
64
normalization:: Method :: Fpkm => fpkm:: normalize ( & lengths, & counts) ,
68
68
let stdout = io:: stdout ( ) . lock ( ) ;
69
69
let mut writer = BufWriter :: new ( stdout) ;
70
70
71
- write_normalized_counts ( & mut writer, & names, & normalized_counts) . map_err ( NormalizeError :: Io ) ?;
71
+ write_normalized_counts ( & mut writer, & names, & normalized_counts) ?;
72
72
73
73
Ok ( ( ) )
74
74
}
You can’t perform that action at this time.
0 commit comments