web: Remove unwraps from Rust glue
* Remove all unwraps from web/lib.rs. * Add convenience methods for grabbing the Ruffle web instance. These methods also avoid panics/unwraps when borrowing `RefCell`/`Mutex`. * Use `warn_on_error` to avoid unwraps from web APIs.
This commit is contained in:
parent
f2256a661b
commit
6cf8b660d5
|
@ -3037,6 +3037,7 @@ dependencies = [
|
|||
"ruffle_render_webgl",
|
||||
"ruffle_web_common",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"url",
|
||||
"wasm-bindgen",
|
||||
"wasm-bindgen-futures",
|
||||
|
|
|
@ -37,6 +37,7 @@ wasm-bindgen-futures = "0.4.19"
|
|||
chrono = { version = "0.4", features = ["wasmbind"] }
|
||||
getrandom = { version = "0.2", features = ["js"] }
|
||||
serde = { version = "1.0.125", features = ["derive"] }
|
||||
thiserror = "1.0"
|
||||
|
||||
[dependencies.ruffle_core]
|
||||
path = "../core"
|
||||
|
|
718
web/src/lib.rs
718
web/src/lib.rs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue