forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
David Renshaw
committed
Jun 29, 2017
1 parent
e3fa4fb
commit 7a755ce
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
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); | ||
} |