@@ -14,8 +14,8 @@ use slog::Logger;
14
14
use std:: fs;
15
15
use std:: result;
16
16
use std:: time:: Instant ;
17
- use PBAR ;
18
17
use wasm_snip;
18
+ use PBAR ;
19
19
20
20
#[ derive( Debug , StructOpt ) ]
21
21
pub enum Command {
@@ -84,16 +84,16 @@ pub enum Command {
84
84
85
85
#[ derive( Clone , Debug , StructOpt ) ]
86
86
pub struct SnipOpitons {
87
- input : String ,
88
- #[ structopt( long = "output" , short = "o" ) ]
89
- pub ( crate ) output : Option < String > ,
90
- functions : Vec < String > ,
91
- #[ structopt( long = "pattern" , short = "p" ) ]
92
- patterns : Vec < String > ,
93
- #[ structopt( long = "snip_rust_fmt_code" ) ]
94
- snip_rust_fmt_code : bool ,
95
- #[ structopt( long = "snip_rust_panicking_code" ) ]
96
- snip_rust_panicking_code : bool ,
87
+ input : String ,
88
+ #[ structopt( long = "output" , short = "o" ) ]
89
+ pub ( crate ) output : Option < String > ,
90
+ functions : Vec < String > ,
91
+ #[ structopt( long = "pattern" , short = "p" ) ]
92
+ patterns : Vec < String > ,
93
+ #[ structopt( long = "snip_rust_fmt_code" ) ]
94
+ snip_rust_fmt_code : bool ,
95
+ #[ structopt( long = "snip_rust_panicking_code" ) ]
96
+ snip_rust_panicking_code : bool ,
97
97
}
98
98
99
99
impl Into < wasm_snip:: Options > for SnipOpitons {
@@ -158,10 +158,9 @@ pub fn run_wasm_pack(command: Command, log: &Logger) -> result::Result<(), Error
158
158
}
159
159
160
160
Command :: Snip ( opts) => {
161
- info ! ( & log, "Running snip command..." ) ;
161
+ info ! ( & log, "Running snip command..." ) ;
162
162
snip ( opts)
163
163
}
164
-
165
164
} ;
166
165
167
166
match status {
@@ -354,7 +353,7 @@ fn set_crate_path(path: Option<String>) -> String {
354
353
355
354
fn snip ( opts : SnipOpitons ) -> Result < ( ) , Error > {
356
355
let opt = opts. clone ( ) ;
357
- let module = wasm_snip:: snip ( opts. into ( ) ) ?;
356
+ let module = wasm_snip:: snip ( opts. into ( ) ) ?;
358
357
359
358
if let Some ( output) = opt. output {
360
359
elements:: serialize_to_file ( output, module) ?;
0 commit comments