mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-17 02:42:13 +00:00
Favor if let
instead of is_some
+ unwrap
This commit is contained in:
parent
8ae6fe19a3
commit
2b9c48d5f9
@ -213,12 +213,12 @@ impl Output {
|
|||||||
}}", base64 = base64::encode(&wasm)),
|
}}", base64 = base64::encode(&wasm)),
|
||||||
inst
|
inst
|
||||||
)
|
)
|
||||||
} else if self.fetch_path.is_some() {
|
} else if let Some(ref path) = self.fetch_path {
|
||||||
(
|
(
|
||||||
String::new(),
|
String::new(),
|
||||||
format!("fetch('{path}')
|
format!("fetch('{path}')
|
||||||
.then(res => res.arrayBuffer())
|
.then(res => res.arrayBuffer())
|
||||||
.then(bytes => {inst})", path = self.fetch_path.unwrap(), inst = inst)
|
.then(bytes => {inst})", path = path, inst = inst)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
panic!("the option --base64 or --fetch is required");
|
panic!("the option --base64 or --fetch is required");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user