Skip to content

Commit b381ade

Browse files
committed
elide lifetimes
1 parent ae56e98 commit b381ade

File tree

1 file changed

+6
-6
lines changed
  • clippy_lints/src/methods

1 file changed

+6
-6
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ declare_clippy_lint! {
13101310
/// **What it does:** Warns when using push_str with a single-character string literal,
13111311
/// and push with a char would work fine.
13121312
///
1313-
/// **Why is this bad?** it's less clear that we are pushing a single character
1313+
/// **Why is this bad?** It's less clear that we are pushing a single character
13141314
///
13151315
/// **Known problems:** None
13161316
///
@@ -3154,9 +3154,9 @@ fn lint_chars_last_cmp_with_unwrap<'tcx>(cx: &LateContext<'tcx>, info: &BinaryEx
31543154
}
31553155
}
31563156

3157-
fn get_hint_if_single_char_arg<'tcx>(
3158-
cx: &LateContext<'tcx>,
3159-
arg: &'tcx hir::Expr<'_>,
3157+
fn get_hint_if_single_char_arg(
3158+
cx: &LateContext<'_>,
3159+
arg: &hir::Expr<'_>,
31603160
applicability: &mut Applicability,
31613161
) -> Option<String> {
31623162
if_chain! {
@@ -3183,7 +3183,7 @@ fn get_hint_if_single_char_arg<'tcx>(
31833183
}
31843184

31853185
/// lint for length-1 `str`s for methods in `PATTERN_METHODS`
3186-
fn lint_single_char_pattern<'tcx>(cx: &LateContext<'tcx>, _expr: &'tcx hir::Expr<'_>, arg: &'tcx hir::Expr<'_>) {
3186+
fn lint_single_char_pattern(cx: &LateContext<'_>, _expr: &hir::Expr<'_>, arg: &hir::Expr<'_>) {
31873187
let mut applicability = Applicability::MachineApplicable;
31883188
if let Some(hint) = get_hint_if_single_char_arg(cx, arg, &mut applicability) {
31893189
span_lint_and_sugg(
@@ -3199,7 +3199,7 @@ fn lint_single_char_pattern<'tcx>(cx: &LateContext<'tcx>, _expr: &'tcx hir::Expr
31993199
}
32003200

32013201
/// lint for length-1 `str`s as argument for `push_str`
3202-
fn lint_single_char_push_string<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>, args: &'tcx [hir::Expr<'_>]) {
3202+
fn lint_single_char_push_string(cx: &LateContext<'_>, expr: &hir::Expr<'_>, args: &[hir::Expr<'_>]) {
32033203
let mut applicability = Applicability::MachineApplicable;
32043204
if let Some(extension_string) = get_hint_if_single_char_arg(cx, &args[1], &mut applicability) {
32053205
let base_string_snippet = snippet_with_applicability(cx, args[0].span, "_", &mut applicability);

0 commit comments

Comments
 (0)