@@ -27,13 +27,13 @@ declare_clippy_lint! {
2727 /// vec!["1", "2", "3"].join("");
2828 /// ```
2929 #[ clippy:: version = "1.62.0" ]
30- pub UNNECESSARY_OWNED_EMPTY_STRING ,
30+ pub UNNECESSARY_OWNED_EMPTY_STRINGS ,
3131 style,
3232 "detects cases of references to owned empty strings being passed as an argument to a function expecting `&str`"
3333}
34- declare_lint_pass ! ( UnnecessaryOwnedEmptyString => [ UNNECESSARY_OWNED_EMPTY_STRING ] ) ;
34+ declare_lint_pass ! ( UnnecessaryOwnedEmptyStrings => [ UNNECESSARY_OWNED_EMPTY_STRINGS ] ) ;
3535
36- impl < ' tcx > LateLintPass < ' tcx > for UnnecessaryOwnedEmptyString {
36+ impl < ' tcx > LateLintPass < ' tcx > for UnnecessaryOwnedEmptyStrings {
3737 fn check_expr ( & mut self , cx : & LateContext < ' tcx > , expr : & ' tcx Expr < ' tcx > ) {
3838 if_chain ! {
3939 if let ExprKind :: AddrOf ( BorrowKind :: Ref , Mutability :: Not , inner_expr) = expr. kind;
@@ -46,7 +46,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyString {
4646 if match_def_path( cx, fun_def_id, & paths:: STRING_NEW ) {
4747 span_lint_and_sugg(
4848 cx,
49- UNNECESSARY_OWNED_EMPTY_STRING ,
49+ UNNECESSARY_OWNED_EMPTY_STRINGS ,
5050 expr. span,
5151 "usage of `&String::new()` for a function expecting a `&str` argument" ,
5252 "try" ,
@@ -65,7 +65,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyString {
6565 then {
6666 span_lint_and_sugg(
6767 cx,
68- UNNECESSARY_OWNED_EMPTY_STRING ,
68+ UNNECESSARY_OWNED_EMPTY_STRINGS ,
6969 expr. span,
7070 "usage of `&String::from(\" \" )` for a function expecting a `&str` argument" ,
7171 "try" ,
0 commit comments