mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-23 19:43:20 +00:00
14 lines
248 B
Rust
14 lines
248 B
Rust
|
#![allow(clippy::single_match)]
|
||
|
|
||
|
use std::ptr;
|
||
|
|
||
|
fn main() {
|
||
|
match Some(0_usize) {
|
||
|
Some(_) => {
|
||
|
let s = "012345";
|
||
|
unsafe { ptr::read(s.as_ptr().offset(1) as *const [u8; 5]) };
|
||
|
},
|
||
|
_ => (),
|
||
|
};
|
||
|
}
|