about summary refs log tree commit diff
path: root/src/libserialize
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-06-16 11:25:47 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-18 17:01:34 -0700
commitff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1 (patch)
treef56ac5a3288101c49c4cc5c2e85b18dd4c2c6ff7 /src/libserialize
parent4c0f8f49f6fe860efa268efa2f4fa0b5f00a4b07 (diff)
downloadrust-ff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1.tar.gz
rust-ff9f92ce5224f5e27b8dc39ffc02eb9481f7cff1.zip
Merge the Bitwise and ByteOrder traits into the Int trait
This reduces the complexity of the trait hierarchy.
Diffstat (limited to 'src/libserialize')
-rw-r--r--src/libserialize/ebml.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libserialize/ebml.rs b/src/libserialize/ebml.rs
index a1c79bc0b75..7d0c82fc9a2 100644
--- a/src/libserialize/ebml.rs
+++ b/src/libserialize/ebml.rs
@@ -154,8 +154,6 @@ pub mod reader {
     }
 
     pub fn vuint_at(data: &[u8], start: uint) -> DecodeResult<Res> {
-        use std::mem::ByteOrder;
-
         if data.len() - start < 4 {
             return vuint_at_slow(data, start);
         }
@@ -185,7 +183,7 @@ pub mod reader {
 
         unsafe {
             let ptr = data.as_ptr().offset(start as int) as *u32;
-            let val = ByteOrder::from_big_endian(*ptr);
+            let val = Int::from_big_endian(*ptr);
 
             let i = (val >> 28u) as uint;
             let (shift, mask) = SHIFT_MASK_TABLE[i];