Skip to content

Commit 39b02fd

Browse files
committed
Fix some warnings related to Self
1 parent 5b77ee9 commit 39b02fd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clippy_lints/src/slow_vector_initialization.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
107107
if let Some(variable_name) = path.segments.get(0);
108108

109109
// Extract len argument
110-
if let Some(ref len_arg) = Pass::is_vec_with_capacity(right);
110+
if let Some(ref len_arg) = Self::is_vec_with_capacity(right);
111111

112112
then {
113113
let vi = VecAllocation {
@@ -116,7 +116,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
116116
len_expr: len_arg,
117117
};
118118

119-
Pass::search_initialization(cx, vi, expr.id);
119+
Self::search_initialization(cx, vi, expr.id);
120120
}
121121
}
122122
}
@@ -128,7 +128,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
128128
if let DeclKind::Local(ref local) = decl.node;
129129
if let PatKind::Binding(BindingAnnotation::Mutable, _, variable_name, None) = local.pat.node;
130130
if let Some(ref init) = local.init;
131-
if let Some(ref len_arg) = Pass::is_vec_with_capacity(init);
131+
if let Some(ref len_arg) = Self::is_vec_with_capacity(init);
132132

133133
then {
134134
let vi = VecAllocation {
@@ -137,7 +137,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
137137
len_expr: len_arg,
138138
};
139139

140-
Pass::search_initialization(cx, vi, stmt.node.id());
140+
Self::search_initialization(cx, vi, stmt.node.id());
141141
}
142142
}
143143
}
@@ -183,14 +183,14 @@ impl Pass {
183183
v.visit_block(enclosing_body.unwrap());
184184

185185
if let Some(ref allocation_expr) = v.slow_expression {
186-
Pass::lint_initialization(cx, allocation_expr, &v.vec_alloc);
186+
Self::lint_initialization(cx, allocation_expr, &v.vec_alloc);
187187
}
188188
}
189189

190190
fn lint_initialization<'tcx>(cx: &LateContext<'_, 'tcx>, initialization: &InitializationType<'tcx>, vec_alloc: &VecAllocation<'_>) {
191191
match initialization {
192192
InitializationType::UnsafeSetLen(e) =>
193-
Pass::emit_lint(
193+
Self::emit_lint(
194194
cx,
195195
e,
196196
vec_alloc,
@@ -200,7 +200,7 @@ impl Pass {
200200

201201
InitializationType::Extend(e) |
202202
InitializationType::Resize(e) =>
203-
Pass::emit_lint(
203+
Self::emit_lint(
204204
cx,
205205
e,
206206
vec_alloc,

0 commit comments

Comments
 (0)