From 50717186abede6cf23fae8d3eedefd0e5693f377 Mon Sep 17 00:00:00 2001 From: Jacob Date: Fri, 26 Apr 2024 12:20:40 +0200 Subject: [PATCH] fix: update tip 11 to mention new Cargo.toml [lints] section --- content/blog/rust-pro-tips-collection.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/blog/rust-pro-tips-collection.md b/content/blog/rust-pro-tips-collection.md index b17fc82..973aae3 100644 --- a/content/blog/rust-pro-tips-collection.md +++ b/content/blog/rust-pro-tips-collection.md @@ -1,7 +1,7 @@ --- title: "Rust Pro Tips (collection)" date: 2023-04-08 -lastmod: 2024-02-10 +lastmod: 2024-05-26 description: "Level up your Rust skills." author: Jacob Lindahl twitter: sudo_build @@ -729,6 +729,15 @@ assert_eq!(my_string, "2468"); ## 11. Enforce Clippy lints in a workspace +**Update**: As of Rust 1.74, [Clippy lints can now be configured in `Cargo.toml`](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html#lint-configuration-through-cargo). While the method originally described in this tip is still available, `Cargo.toml` is likely a more convenient way to configure lints. + +```toml +[lints.clippy] +large_digit_groups = "warn" +``` + +--- + [Tweet](https://twitter.com/sudo_build/status/1567168431094468608) Enforce a consistent set of Clippy lints across multiple crates in one workspace by adding to `.cargo/config.toml` at the project root.