Follow

that you can disallow certain types in your code with (since 1.55):

nnethercote.github.io/perf-boo

This is useful, if you e.g. want to use a faster HashMap (e.g. from ahash) and not the std HashMap.

Official docs:
rust-lang.github.io/rust-clipp

· · Web · 0 · 4 · 8

@schlink Yeah, what I really like is that you can also provide a reason in your clippy.toml on _why_ you've disallowed the type. Excerpt from their docs:

# clippy.toml
disallowed-types = [
# When using an inline table, can add a `reason` for why the type
# is disallowed.
{ path = "std::net::Ipv4Addr", reason = "no IPv4 allowed" },
]

The Rust folks are just awesome! ❤️

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!