Skip to content

Commit

Permalink
Forbid use of std::time::Instant on wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Mar 26, 2024
1 parent a03604f commit 8a10f81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/clippy_wasm/clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
]

Expand Down

0 comments on commit 8a10f81

Please sign in to comment.