remove nondeterminism by adjusting thresholds

This commit is contained in:
Oliver Schneider
2016-12-21 10:25:14 +01:00
parent 299d7be132
commit ed9d71f2c9
30 changed files with 157 additions and 133 deletions

View File

@@ -152,11 +152,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for StringLitAsBytes {
e.span,
"calling `as_bytes()` on a string literal",
|db| {
let sugg = format!("b{}", snippet(cx, args[0].span, r#""foo""#));
db.span_suggestion(e.span,
"consider using a byte string literal instead",
sugg);
});
let sugg = format!("b{}", snippet(cx, args[0].span, r#""foo""#));
db.span_suggestion(e.span, "consider using a byte string literal instead", sugg);
});
}
}