提交 7a755ce8 编写于 作者: D David Renshaw

add a dependency to cargo-miri-test

上级 e3fa4fb8
[root]
name = "cargo-miri-test"
version = "0.1.0"
dependencies = [
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "byteorder"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c40977b0ee6b9885c9013cd41d9feffdd22deb3bb4dc3a71d901cc7a77de18c8"
......@@ -4,3 +4,4 @@ version = "0.1.0"
authors = ["Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>"]
[dependencies]
byteorder = "1.0"
\ No newline at end of file
extern crate byteorder;
use byteorder::{BigEndian, ByteOrder};
fn main() {
assert_eq!(5, 5);
let buf = &[1,2,3,4];
let n = <BigEndian as ByteOrder>::read_u32(buf);
assert_eq!(n, 0x01020304);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册