File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -352,10 +352,9 @@ fn set_crate_path(path: Option<String>) -> String {
352
352
}
353
353
354
354
fn snip ( opts : SnipOpitons ) -> Result < ( ) , Error > {
355
- let opt = opts. clone ( ) ;
356
- let module = wasm_snip:: snip ( opts. into ( ) ) ?;
355
+ let module = wasm_snip:: snip ( opts. clone ( ) . into ( ) ) ?;
357
356
358
- if let Some ( output) = opt . output {
357
+ if let Some ( output) = opts . output {
359
358
elements:: serialize_to_file ( output, module) ?;
360
359
} else {
361
360
let stdout = :: std:: io:: stdout ( ) ;
Original file line number Diff line number Diff line change @@ -69,19 +69,21 @@ impl From<toml::de::Error> for Error {
69
69
}
70
70
}
71
71
72
+ /// wasm-snip occurs error when trying to print out the result.
72
73
impl From < parity_wasm:: elements:: Error > for Error {
73
74
fn from ( error : parity_wasm:: elements:: Error ) -> Self {
74
75
Error :: Cli {
75
- message : format ! ( "{}" , " There was an output Error") ,
76
+ message : " There was an wasm-snip output Error". to_owned ( ) ,
76
77
stderr : format ! ( "{}" , error) ,
77
78
}
78
79
}
79
80
}
80
81
82
+ /// wasm-snip occurs error when working with inputs.
81
83
impl From < failure:: Error > for Error {
82
84
fn from ( error : failure:: Error ) -> Self {
83
85
Error :: Cli {
84
- message : format ! ( "{}" , " There was an wasm-snip Error") ,
86
+ message : " There was an wasm-snip Error". to_owned ( ) ,
85
87
stderr : format ! ( "{}" , error) ,
86
88
}
87
89
}
You can’t perform that action at this time.
0 commit comments