Skip to content

Commit 03fed75

Browse files
committed
Address internal lints
1 parent 2181387 commit 03fed75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/uninit_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ fn handle_uninit_vec_pair(
113113
UNINIT_VEC,
114114
vec![call_span, maybe_init_or_reserve.span],
115115
"calling `set_len()` on empty `Vec` creates out-of-bound values",
116-
)
116+
);
117117
}
118118
}
119119
}

clippy_utils/src/higher.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use rustc_hir::{
1111
Arm, Block, BorrowKind, Expr, ExprKind, HirId, LoopSource, MatchSource, Node, Pat, QPath, StmtKind, UnOp,
1212
};
1313
use rustc_lint::LateContext;
14-
use rustc_span::{sym, ExpnKind, Span, Symbol};
14+
use rustc_span::{sym, symbol, ExpnKind, Span, Symbol};
1515

1616
/// The essential nodes of a desugared for loop as well as the entire span:
1717
/// `for pat in arg { body }` becomes `(pat, arg, body)`. Return `(pat, arg, body, span)`.
@@ -658,7 +658,7 @@ pub fn get_vec_init_kind<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -
658658
{
659659
if name.ident.name == sym::new {
660660
return Some(VecInitKind::New);
661-
} else if name.ident.name.as_str() == "default" {
661+
} else if name.ident.name == symbol::kw::Default {
662662
return Some(VecInitKind::Default);
663663
} else if name.ident.name.as_str() == "with_capacity" {
664664
let arg = args.get(0)?;

0 commit comments

Comments
 (0)