From e34c6dbae5768b5dce90c02465f3492376327c65 Mon Sep 17 00:00:00 2001 From: Jason Newcomb Date: Fri, 12 Jul 2024 00:00:03 -0400 Subject: Refactor for using config values: * Construct lint passes by taking `Conf` by reference. * Use `HashSet` configs in less places * Move some `check_crate` code into the pass constructor when possible. --- clippy_lints/src/large_stack_frames.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clippy_lints/src/large_stack_frames.rs') diff --git a/clippy_lints/src/large_stack_frames.rs b/clippy_lints/src/large_stack_frames.rs index 49408d7e243..4abf7edc9b4 100644 --- a/clippy_lints/src/large_stack_frames.rs +++ b/clippy_lints/src/large_stack_frames.rs @@ -1,5 +1,6 @@ use std::{fmt, ops}; +use clippy_config::Conf; use clippy_utils::diagnostics::span_lint_and_then; use clippy_utils::fn_has_unsatisfiable_preds; use clippy_utils::source::snippet_opt; @@ -85,10 +86,9 @@ pub struct LargeStackFrames { } impl LargeStackFrames { - #[must_use] - pub fn new(size: u64) -> Self { + pub fn new(conf: &'static Conf) -> Self { Self { - maximum_allowed_size: size, + maximum_allowed_size: conf.stack_size_threshold, } } } -- cgit 1.4.1-3-g733a5