From 1bb92980597c0ce19d13afc0604db68f432b984a Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 19 Oct 2021 14:34:51 +0200 Subject: [PATCH] Update clippy configuration --- .clippy.toml | 1 + crates/ruma-signatures/src/error.rs | 1 + crates/ruma-state-res/.clippy.toml | 11 ++++------- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.clippy.toml b/.clippy.toml index 5867c685..01ad219e 100644 --- a/.clippy.toml +++ b/.clippy.toml @@ -1,4 +1,5 @@ msrv = "1.53" +avoid-breaking-exported-api = false disallowed-types = [ "std::collections::HashMap", "std::collections::HashSet", diff --git a/crates/ruma-signatures/src/error.rs b/crates/ruma-signatures/src/error.rs index c428a63b..47f4820f 100644 --- a/crates/ruma-signatures/src/error.rs +++ b/crates/ruma-signatures/src/error.rs @@ -4,6 +4,7 @@ use thiserror::Error; /// `ruma-signature`'s error type, wraps a number of other error types. #[derive(Debug, Error)] #[non_exhaustive] +#[allow(clippy::enum_variant_names)] pub enum Error { /// [`JsonError`] wrapper. #[error("JSON error: {0}")] diff --git a/crates/ruma-state-res/.clippy.toml b/crates/ruma-state-res/.clippy.toml index 852a9d42..2b37dd20 100644 --- a/crates/ruma-state-res/.clippy.toml +++ b/crates/ruma-state-res/.clippy.toml @@ -1,13 +1,10 @@ msrv = "1.53" +avoid-breaking-exported-api = false disallowed-types = [] enforced-import-renames = [ { path = "serde_json::Value", rename = "JsonValue" } ] standard-macro-braces = [ { name = "btreeset", brace = "[" }, - # The macro calls itself like btreemap!(...) so this triggers for any use - # { name = "btreemap", brace = "{" }, - - # For some reason these raise errors in some places where the macros are - # used correctly according to the config - # { name = "hashset", brace = "[" }, - # { name = "hashmap", brace = "{" }, + { name = "btreemap", brace = "{" }, + { name = "hashset", brace = "[" }, + { name = "hashmap", brace = "{" }, ]