diff --git a/src/byte_sized.rs b/src/byte_sized.rs index 1b04e87..70eedd3 100644 --- a/src/byte_sized.rs +++ b/src/byte_sized.rs @@ -89,12 +89,13 @@ macro_rules! byte_sized_impl )*} } -byte_sized_impl!((u8, U8_BYTES) (u16, U16_BYTES)); -byte_sized_impl!((u32, U32_BYTES) (u64, I64_BYTES)); -byte_sized_impl!((i8, I8_BYTES) (i16, I16_BYTES)); -byte_sized_impl!((i32, I32_BYTES) (i64, U64_BYTES)); +byte_sized_impl!((i8, I8_BYTES) (u8, U8_BYTES)); +byte_sized_impl!((i16, I16_BYTES) (u16, U16_BYTES)); +byte_sized_impl!((i32, I32_BYTES) (u32, U32_BYTES)); +byte_sized_impl!((i64, I64_BYTES) (u64, U64_BYTES)); +byte_sized_impl!((isize, ISIZE_BYTES) (usize, USIZE_BYTES)); byte_sized_impl!((f32, F32_BYTES) (f64, F64_BYTES)); -byte_sized_impl!((usize, USIZE_BYTES) (isize, ISIZE_BYTES)); + /// This returns the amount of bytes it takes to store a string diff --git a/src/endian.rs b/src/endian.rs index 837cff5..0e9826d 100644 --- a/src/endian.rs +++ b/src/endian.rs @@ -19,7 +19,6 @@ pub type PlatformEndian = BigEndian; /// This library does not support a mixed endian setting. /// /// Defaults to LittleEndian. -//#[cfg(target_endian="little")] #[cfg(not(target_endian="big"))] pub type PlatformEndian = LittleEndian; @@ -35,12 +34,16 @@ pub type NetworkEndian = BigEndian; /// Handles serialization where the most /// significant byte is stored at the lowest address. +/// +/// Ex. '123' would be stored as 123. pub enum BigEndian { } /// Handles serialization where the most -/// significant byte is stored at the lowest address. +/// significant byte is stored at the highest address. +/// +/// Ex. '123' would be stored as 321. pub enum LittleEndian { }