Skip to content

Commit b1a21ae

Browse files
committed
Update endian_bytes.rs
1 parent a6c3655 commit b1a21ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/endian_bytes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ impl LintKind {
9595
}
9696

9797
fn as_name(&self, prefix: &Prefix) -> &str {
98-
let index = if matches!(prefix, Prefix::From) { 0 } else { 1 };
98+
let index = usize::from(matches!(prefix, Prefix::To));
9999

100100
match self {
101101
LintKind::Host => HOST_NAMES[index],

0 commit comments

Comments
 (0)