Update clippy_lints/src/methods/bytes_nth.rs

Co-authored-by: Phil Hansch <dev@phansch.net>
This commit is contained in:
Takayuki Maeda 2021-02-10 15:49:07 +09:00 committed by GitHub
parent 1c3033d5cf
commit 932cc085e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ pub(super) fn lints<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, iter_args: &'
BYTES_NTH,
expr.span,
&format!("called `.byte().nth()` on a `{}`", caller_type),
"try calling `.as_bytes().get()`",
"try",
format!(
"{}.as_bytes().get({})",
snippet_with_applicability(cx, iter_args[0].span, "..", &mut applicability),