rust/cargo-miri-test/src/main.rs

10 lines
189 B
Rust
Raw Normal View History

2017-06-29 12:59:47 -05:00
extern crate byteorder;
use byteorder::{BigEndian, ByteOrder};
fn main() {
2017-06-29 12:59:47 -05:00
let buf = &[1,2,3,4];
let n = <BigEndian as ByteOrder>::read_u32(buf);
assert_eq!(n, 0x01020304);
}