use byteorder::{BigEndian, ByteOrder}; fn main() { let buf = &[1,2,3,4]; let n = ::read_u32(buf); assert_eq!(n, 0x01020304); println!("{:#010x}", n); eprintln!("standard error"); }