about summary refs log tree commit diff
path: root/clippy_dev/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2018-09-26 11:32:05 +0200
committerMatthias Krüger <matthias.krueger@famsik.de>2018-09-26 22:24:18 +0200
commit2a31937cc997df21498e7649c1f170b5a145ae83 (patch)
tree843f7e5e817fd4fe3bb31757e786d2c1c05bcf19 /clippy_dev/src
parenta72e786c5d8866d554effd246c30fb553b63fa06 (diff)
downloadrust-2a31937cc997df21498e7649c1f170b5a145ae83.tar.gz
rust-2a31937cc997df21498e7649c1f170b5a145ae83.zip
fix all clippy::use_self pedantic warnings found in the codebase.
cc #3172
Diffstat (limited to 'clippy_dev/src')
-rw-r--r--clippy_dev/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_dev/src/lib.rs b/clippy_dev/src/lib.rs
index e5ce8580fa1..2f91c987cb1 100644
--- a/clippy_dev/src/lib.rs
+++ b/clippy_dev/src/lib.rs
@@ -35,8 +35,8 @@ pub struct Lint {
 }
 
 impl Lint {
-    pub fn new(name: &str, group: &str, desc: &str, deprecation: Option<&str>, module: &str) -> Lint {
-        Lint {
+    pub fn new(name: &str, group: &str, desc: &str, deprecation: Option<&str>, module: &str) -> Self {
+        Self {
             name: name.to_lowercase(),
             group: group.to_string(),
             desc: NL_ESCAPE_RE.replace(&desc.replace("\\\"", "\""), "").to_string(),
@@ -46,12 +46,12 @@ impl Lint {
     }
 
     /// Returns all non-deprecated lints
-    pub fn active_lints(lints: &[Lint]) -> impl Iterator<Item=&Lint> {
+    pub fn active_lints(lints: &[Self]) -> impl Iterator<Item=&Self> {
         lints.iter().filter(|l| l.deprecation.is_none())
     }
 
     /// Returns the lints in a HashMap, grouped by the different lint groups
-    pub fn by_lint_group(lints: &[Lint]) -> HashMap<String, Vec<Lint>> {
+    pub fn by_lint_group(lints: &[Self]) -> HashMap<String, Vec<Self>> {
         lints.iter().map(|lint| (lint.group.to_string(), lint.clone())).into_group_map()
     }
 }