From 8a10f81ca01b2ba4e0bd6e08d02fdd2063f1ddcc Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 26 Mar 2024 11:15:08 +0100 Subject: [PATCH] Forbid use of `std::time::Instant` on wasm --- scripts/clippy_wasm/clippy.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/clippy_wasm/clippy.toml b/scripts/clippy_wasm/clippy.toml index aadfe75d..0e8b9474 100644 --- a/scripts/clippy_wasm/clippy.toml +++ b/scripts/clippy_wasm/clippy.toml @@ -38,6 +38,7 @@ disallowed-methods = [ disallowed-types = [ { path = "instant::SystemTime", reason = "Known bugs. Use web-time." }, { path = "std::thread::Builder", reason = "Cannot spawn threads on wasm" }, + { path = "std::time::Instant", reason = "Use web-time instead." }, # { path = "std::path::PathBuf", reason = "Can't read/write files on web" }, // TODO(emilk): consider banning Path on wasm ]