matrix-sdk: Use the instant crate so Instant works on wasm as well.
This commit is contained in:
parent
19b8a1686d
commit
2a411bf5df
5 changed files with 6 additions and 4 deletions
|
@ -19,8 +19,8 @@ use std::collections::HashMap;
|
|||
use std::convert::{TryFrom, TryInto};
|
||||
use std::result::Result as StdResult;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use matrix_sdk_common::instant::{Duration, Instant};
|
||||
use matrix_sdk_common::locks::RwLock;
|
||||
use matrix_sdk_common::uuid::Uuid;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ ruma-api = "0.16.0"
|
|||
ruma-client-api = "0.8.0"
|
||||
ruma-events = "0.21.0"
|
||||
ruma-identifiers = "0.16.1"
|
||||
instant = { version = "0.1.3", features = ["wasm-bindgen", "now"] }
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
||||
uuid = { version = "0.8.1", features = ["v4"] }
|
||||
|
@ -27,4 +28,4 @@ features = ["sync", "time", "fs"]
|
|||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
futures-locks = { git = "https://github.com/asomers/futures-locks", default-features = false }
|
||||
uuid = { version = "0.8.1", features = ["v4", "wasm-bindgen"] }
|
||||
uuid = { version = "0.8.1", features = ["v4", "wasm-bindgen"] }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
pub use instant;
|
||||
pub use js_int;
|
||||
pub use ruma_api::{
|
||||
error::{FromHttpResponseError, IntoHttpError, ServerError},
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use matrix_sdk_common::instant::Instant;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::time::Instant;
|
||||
|
||||
use matrix_sdk_common::locks::Mutex;
|
||||
use serde::Serialize;
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use matrix_sdk_common::instant::{Duration, Instant};
|
||||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::convert::TryFrom;
|
||||
use std::mem;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::result::Result as StdResult;
|
||||
use std::sync::Arc;
|
||||
use std::time::{Duration, Instant};
|
||||
use url::Url;
|
||||
|
||||
use async_trait::async_trait;
|
||||
|
|
Loading…
Reference in a new issue