File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ impl Config {
29
29
self . base64 = base64;
30
30
self
31
31
}
32
-
32
+
33
33
pub fn fetch ( & mut self , path : Option < String > ) -> & mut Self {
34
34
self . fetch_path = path;
35
35
self
@@ -195,7 +195,7 @@ impl Output {
195
195
.then(obj => {{
196
196
wasm = obj.instance;
197
197
{memory}
198
- }})" ,
198
+ }})" ,
199
199
imports = imports,
200
200
memory = if export_mem { "memory = wasm.exports.memory;" } else { "" } ,
201
201
) ;
@@ -213,12 +213,12 @@ impl Output {
213
213
}}" , base64 = base64:: encode( & wasm) ) ,
214
214
inst
215
215
)
216
- } else if self . fetch_path . is_some ( ) {
216
+ } else if let Some ( ref path ) = self . fetch_path {
217
217
(
218
218
String :: new ( ) ,
219
219
format ! ( "fetch('{path}')
220
220
.then(res => res.arrayBuffer())
221
- .then(bytes => {inst})" , path = self . fetch_path . unwrap ( ) , inst = inst)
221
+ .then(bytes => {inst})" , path = path , inst = inst)
222
222
)
223
223
} else {
224
224
panic ! ( "the option --base64 or --fetch is required" ) ;
You can’t perform that action at this time.
0 commit comments