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 @@ -216,19 +216,21 @@ impl From<toml::de::Error> for Error {
216
216
}
217
217
}
218
218
219
+ /// wasm-snip occurs error when trying to print out the result.
219
220
impl From < parity_wasm:: elements:: Error > for Error {
220
221
fn from ( error : parity_wasm:: elements:: Error ) -> Self {
221
222
Error :: Cli {
222
- message : format ! ( "{}" , " There was an output Error") ,
223
+ message : " There was an wasm-snip output Error". to_owned ( ) ,
223
224
stderr : format ! ( "{}" , error) ,
224
225
}
225
226
}
226
227
}
227
228
229
+ /// wasm-snip occurs error when working with inputs.
228
230
impl From < failure:: Error > for Error {
229
231
fn from ( error : failure:: Error ) -> Self {
230
232
Error :: Cli {
231
- message : format ! ( "{}" , " There was an wasm-snip Error") ,
233
+ message : " There was an wasm-snip Error". to_owned ( ) ,
232
234
stderr : format ! ( "{}" , error) ,
233
235
}
234
236
}
You can’t perform that action at this time.
0 commit comments