From 707287829bc5c25c51a2104bf071341a6bb68a7d Mon Sep 17 00:00:00 2001 From: tyranron Date: Fri, 6 Sep 2024 17:06:13 +0300 Subject: [PATCH] Tune lints for 1.81 Rust --- src/lib.rs | 5 +++++ src/trace.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index fd330eb..6ad3fc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -10,10 +10,13 @@ #![forbid(non_ascii_idents, unsafe_code)] #![warn( clippy::absolute_paths, + clippy::allow_attributes, + clippy::allow_attributes_without_reason, clippy::as_conversions, clippy::as_ptr_cast_mut, clippy::assertions_on_result_states, clippy::branches_sharing_code, + clippy::cfg_not_test, clippy::clear_with_drain, clippy::clone_on_ref_ptr, clippy::collection_is_never_read, @@ -32,6 +35,7 @@ clippy::exit, clippy::expect_used, clippy::fallible_impl_from, + clippy::field_scoped_visibility_modifiers, clippy::filetype_is_file, clippy::float_cmp_const, clippy::fn_to_numeric_cast, @@ -84,6 +88,7 @@ clippy::rest_pat_in_fully_bound_structs, clippy::same_name_method, clippy::semicolon_inside_block, + clippy::set_contains_or_insert, clippy::shadow_unrelated, clippy::significant_drop_in_scrutinee, clippy::significant_drop_tightening, diff --git a/src/trace.rs b/src/trace.rs index 1d3922f..625413d 100644 --- a/src/trace.rs +++ b/src/trace.rs @@ -41,7 +41,7 @@ impl Trace { /// Creates and returns new [`Trace`] from the given [`Frame`]s. #[inline] #[must_use] - pub fn new(frames: Vec) -> Self { + pub const fn new(frames: Vec) -> Self { Self(frames) } }