about summary refs log tree commit diff
path: root/clippy_lints/src/string_patterns.rs
diff options
context:
space:
mode:
authorPhilipp Krones <hello@philkrones.com>2024-07-25 18:09:52 +0200
committerPhilipp Krones <hello@philkrones.com>2024-07-25 18:23:27 +0200
commit9f53fc32cfb62724d95de44779259ce4e24bc085 (patch)
treedf5069c84c1a281c78b72e8935a9664b3110f66a /clippy_lints/src/string_patterns.rs
parent6d674685ae4e9156dbb6ecd3aa38d87864ecab3e (diff)
parentdf0cb6c51ee798264586ee9144466cf003d68181 (diff)
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/string_patterns.rs')
-rw-r--r--clippy_lints/src/string_patterns.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/clippy_lints/src/string_patterns.rs b/clippy_lints/src/string_patterns.rs
index 7ba58942a17..7e211d64da1 100644
--- a/clippy_lints/src/string_patterns.rs
+++ b/clippy_lints/src/string_patterns.rs
@@ -1,6 +1,7 @@
 use std::ops::ControlFlow;
 
 use clippy_config::msrvs::{self, Msrv};
+use clippy_config::Conf;
 use clippy_utils::diagnostics::{span_lint_and_sugg, span_lint_and_then};
 use clippy_utils::eager_or_lazy::switch_to_eager_eval;
 use clippy_utils::macros::matching_root_macro_call;
@@ -75,9 +76,10 @@ pub struct StringPatterns {
 }
 
 impl StringPatterns {
-    #[must_use]
-    pub fn new(msrv: Msrv) -> Self {
-        Self { msrv }
+    pub fn new(conf: &'static Conf) -> Self {
+        Self {
+            msrv: conf.msrv.clone(),
+        }
     }
 }