Skip to content

Commit

Permalink
Update clippy_lints/src/methods/bytes_nth.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Hansch <dev@phansch.net>
  • Loading branch information
TaKO8Ki and phansch committed Feb 10, 2021
1 parent 1c3033d commit 932cc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/methods/bytes_nth.rs
Expand Up @@ -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),
Expand Down

0 comments on commit 932cc08

Please sign in to comment.