gridcraft/clippy.toml

13 lines
579 B
TOML

allow-unwrap-in-tests = true
allow-expect-in-tests = true
allow-panic-in-tests = true
allow-indexing-slicing-in-tests = true
# The web app (wasm32-unknown-unknown) has no clock: these trap (`RuntimeError: unreachable`)
# instead of returning. Read the clock only off wasm (`cfg(not(target_arch = "wasm32"))` or
# `cfg!`) and allow the lint at that call.
disallowed-methods = [
{ path = "std::time::Instant::now", reason = "traps on wasm; read the clock only off wasm" },
{ path = "std::time::SystemTime::now", reason = "traps on wasm; read the clock only off wasm" },
]