From 51072a5dab4465509f26890edd32ffa66af65112 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Sun, 12 Sep 2021 00:57:35 +0200 Subject: [PATCH] fix(common): wasm_bindgen dependency feature instant doesn't need wasm_bindgen on non wasm targets --- matrix_sdk_common/Cargo.toml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 82be838c..7a27e2f6 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -12,7 +12,6 @@ version = "0.4.0" [dependencies] async-trait = "0.1.50" -instant = { version = "0.1.9", features = ["wasm-bindgen", "now"] } ruma = { version = "0.4.0", features = ["client-api-c"] } serde = "1.0.126" @@ -24,6 +23,14 @@ version = "1.7.1" default-features = false features = ["rt", "sync"] +[target.'cfg(target_arch = "wasm32")'.dependencies.instant] +version = "0.1.9" +features = ["wasm-bindgen", "now"] + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies.instant] +version = "0.1.9" +features = ["now"] + [target.'cfg(target_arch = "wasm32")'.dependencies] futures = "0.3.15" futures-locks = { version = "0.6.0", default-features = false }