From 9ea6a73ca4f24e0ef95377cbcd58a57a8766b294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= Date: Fri, 20 Sep 2024 20:19:24 +0100 Subject: [PATCH] chore: sort imports --- Cargo.lock | 1 + um_wasm/Cargo.toml | 1 + um_wasm/src/exports/mod.rs | 3 ++- um_wasm/src/exports/qtfm.rs | 0 um_wasm/src/lib.rs | 13 +++++++------ 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 um_wasm/src/exports/qtfm.rs diff --git a/Cargo.lock b/Cargo.lock index bfa5fdc..d622263 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -556,6 +556,7 @@ dependencies = [ "umc_kuwo", "umc_ncm", "umc_qmc", + "umc_qtfm", "umc_xiami", "umc_xmly", "wasm-bindgen", diff --git a/um_wasm/Cargo.toml b/um_wasm/Cargo.toml index 0a24e90..fc8cd09 100644 --- a/um_wasm/Cargo.toml +++ b/um_wasm/Cargo.toml @@ -28,6 +28,7 @@ umc_kgm = { path = "../um_crypto/kgm" } umc_kuwo = { path = "../um_crypto/kuwo" } umc_ncm = { path = "../um_crypto/ncm" } umc_qmc = { path = "../um_crypto/qmc" } +umc_qtfm = { path = "../um_crypto/qtfm" } umc_xiami = { path = "../um_crypto/xiami" } umc_xmly = { path = "../um_crypto/xmly" } um_audio = { path = "../um_audio" } diff --git a/um_wasm/src/exports/mod.rs b/um_wasm/src/exports/mod.rs index 62c622c..e0642c7 100644 --- a/um_wasm/src/exports/mod.rs +++ b/um_wasm/src/exports/mod.rs @@ -4,5 +4,6 @@ pub mod kgm; pub mod kuwo; pub mod ncm; pub mod qmc; -mod xiami; +pub mod qtfm; +pub mod xiami; pub mod xmly; diff --git a/um_wasm/src/exports/qtfm.rs b/um_wasm/src/exports/qtfm.rs new file mode 100644 index 0000000..e69de29 diff --git a/um_wasm/src/lib.rs b/um_wasm/src/lib.rs index 60086d2..bef4c00 100644 --- a/um_wasm/src/lib.rs +++ b/um_wasm/src/lib.rs @@ -1,12 +1,13 @@ -mod errors; -pub mod exports; -mod utils; - use utils::set_panic_hook; use wasm_bindgen::prelude::*; +mod errors; +mod utils; + +pub mod exports; + /// Init panic hook -#[wasm_bindgen] -pub fn init() { +#[wasm_bindgen(js_name=initPanicHook)] +pub fn init_panic_hook() { set_panic_hook(); }