Skip to content

Commit d229d91

Browse files
tesujimati865
andauthored
use usize::from
Co-Authored-By: Mateusz Mikuła <[email protected]>
1 parent 4da0da9 commit d229d91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/strings.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for StringLitAsBytes {
154154
if let LitKind::Str(ref lit_content, style) = lit.node {
155155
let callsite = snippet(cx, args[0].span.source_callsite(), r#""foo""#);
156156
let expanded = if let StrStyle::Raw(n) = style {
157-
let term = "#".repeat(n as usize);
157+
let term = "#".repeat(usize::from(n));
158158
format!("r{0}\"{1}\"{0}", term, lit_content.as_str())
159159
} else {
160160
format!("\"{}\"", lit_content.as_str())

0 commit comments

Comments
 (0)