diff --git a/Cargo.toml b/Cargo.toml index ecabf22..ac1a99c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,6 +52,29 @@ compiletest_rs = "0.10.2" fatal-warnings = [] triomphe = ["dep:triomphe"] +[lints.clippy] +all = { level = "warn", priority = -1 } +pedantic = { level = "warn", priority = -1 } +correctness = "deny" + +explicit-deref-methods = "allow" +if-not-else = "allow" +inline-always = "allow" +match-bool = "allow" +missing-errors-doc = "allow" +missing-safety-doc = "allow" +module-name-repetitions = "allow" +partialeq-ne-impl = "allow" +similar-names = "allow" +single-match-else = "allow" +use-self = "allow" +wildcard-imports = "allow" + +[lints.rustdoc] +# TODO This is only needed because `cargo-rdme` requires a path like `crate::⋯`. Once that limitation is lifted we +# can remove this. +redundant-explicit-links = "allow" + [[bench]] name = "std_rc" path = "benches/std_rc.rs" diff --git a/benches/archery_shared_pointer_arc.rs b/benches/archery_shared_pointer_arc.rs index e8adb64..0a25203 100644 --- a/benches/archery_shared_pointer_arc.rs +++ b/benches/archery_shared_pointer_arc.rs @@ -23,7 +23,7 @@ fn archery_shared_pointer_arc_deref(c: &mut Criterion) { } rc - }) + }); }); } @@ -37,7 +37,7 @@ fn archery_shared_pointer_arc_clone(c: &mut Criterion) { vec.resize(limit, SharedPointer::<_, ArcK>::new(42)); vec }, - ) + ); }); } diff --git a/benches/archery_shared_pointer_arct.rs b/benches/archery_shared_pointer_arct.rs index 9e0b056..c7d65df 100644 --- a/benches/archery_shared_pointer_arct.rs +++ b/benches/archery_shared_pointer_arct.rs @@ -23,7 +23,7 @@ fn archery_shared_pointer_arct_deref(c: &mut Criterion) { } rc - }) + }); }); } @@ -37,7 +37,7 @@ fn archery_shared_pointer_arct_clone(c: &mut Criterion) { vec.resize(limit, SharedPointer::<_, ArcTK>::new(42)); vec }, - ) + ); }); } diff --git a/benches/archery_shared_pointer_rc.rs b/benches/archery_shared_pointer_rc.rs index 3ecc419..3a159b3 100644 --- a/benches/archery_shared_pointer_rc.rs +++ b/benches/archery_shared_pointer_rc.rs @@ -23,7 +23,7 @@ fn archery_shared_pointer_rc_deref(c: &mut Criterion) { } rc - }) + }); }); } @@ -37,7 +37,7 @@ fn archery_shared_pointer_rc_clone(c: &mut Criterion) { vec.resize(limit, SharedPointer::<_, RcK>::new(42)); vec }, - ) + ); }); } diff --git a/benches/std_arc.rs b/benches/std_arc.rs index 8f6b34a..76adb8a 100644 --- a/benches/std_arc.rs +++ b/benches/std_arc.rs @@ -23,7 +23,7 @@ fn std_arc_deref(c: &mut Criterion) { } rc - }) + }); }); } @@ -37,7 +37,7 @@ fn std_arc_clone(c: &mut Criterion) { vec.resize(limit, Arc::new(42)); vec }, - ) + ); }); } diff --git a/benches/std_rc.rs b/benches/std_rc.rs index da44dcf..61c63e5 100644 --- a/benches/std_rc.rs +++ b/benches/std_rc.rs @@ -23,7 +23,7 @@ fn std_rc_deref(c: &mut Criterion) { } rc - }) + }); }); } @@ -37,7 +37,7 @@ fn std_rc_clone_and_drop(c: &mut Criterion) { vec.resize(limit, Rc::new(42)); vec }, - ) + ); }); } diff --git a/src/lib.rs b/src/lib.rs index 31ae860..b077f94 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,22 +5,6 @@ #![no_std] #![cfg_attr(feature = "fatal-warnings", deny(warnings))] -#![deny(clippy::correctness)] -#![warn(clippy::pedantic)] -#![allow(clippy::match_bool)] -#![allow(clippy::if_not_else)] -#![allow(clippy::module_name_repetitions)] -#![allow(clippy::similar_names)] -#![allow(clippy::use_self)] -#![allow(clippy::single_match_else)] -#![allow(clippy::inline_always)] -#![allow(clippy::partialeq_ne_impl)] -#![allow(clippy::missing_errors_doc)] -#![allow(clippy::explicit_deref_methods)] -#![allow(clippy::missing_safety_doc)] -// TODO This is only needed because `cargo-rdme` requires a path like `crate::⋯`. Once that limitation is -// lifted we can remove this. -#![allow(rustdoc::redundant_explicit_links)] // Note: If you change this remember to update `README.md`. To do so run `cargo rdme`. //! `archery` is a rust library that offers a way to abstraction over //! [`Rc`](::alloc::rc::Rc) and diff --git a/tests/tests.rs b/tests/tests.rs index 9aa885b..d597387 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -5,6 +5,7 @@ extern crate compiletest_rs as compiletest; use std::path::{Path, PathBuf}; +#[allow(clippy::case_sensitive_file_extension_comparisons)] fn find_rlib(dependency_path: &Path, dependency_name: &str) -> std::io::Result> { use std::fs::read_dir; @@ -12,8 +13,7 @@ fn find_rlib(dependency_path: &Path, dependency_name: &str) -> std::io::Result