mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
14 lines
283 B
Rust
14 lines
283 B
Rust
|
#![allow(unused)]
|
||
|
#![warn(clippy::byte_char_slices)]
|
||
|
|
||
|
fn main() {
|
||
|
let bad = b"abc";
|
||
|
let quotes = b"\"Hi";
|
||
|
let quotes = b"'Sup";
|
||
|
let escapes = b"\x42Esc";
|
||
|
|
||
|
let good = &[b'a', 0x42];
|
||
|
let good = [b'a', b'a'];
|
||
|
let good: u8 = [b'a', b'c'].into_iter().sum();
|
||
|
}
|