From 6ff27de3c79997e7162d702917de986ff61fe044 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Thu, 14 Apr 2016 15:08:31 -0400 Subject: [PATCH] Making the Endian enumeration follow the standard of CamelCase names. --- src/endian.rs | 6 +++--- src/transmutable.rs | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/endian.rs b/src/endian.rs index 75416cb..3e38035 100644 --- a/src/endian.rs +++ b/src/endian.rs @@ -40,15 +40,15 @@ pub enum LittleEndian pub enum Endianess { /// Referes to BigEndian. - BIG, + Big, /// Referes to LittleEndian. - LITTLE, + Little, /// Referes to PlatformEndian. This can be anyone /// of the other available endians depending on /// the platform you are on. - PLATFORM + Platform } diff --git a/src/transmutable.rs b/src/transmutable.rs index e81e786..50c3bc5 100644 --- a/src/transmutable.rs +++ b/src/transmutable.rs @@ -32,17 +32,17 @@ macro_rules! handle_endianess_to_bytes { match $endianess { - Endianess::BIG => + Endianess::Big => { $buffer.append(&mut BigEndian::$func(*$val)); } - Endianess::LITTLE => + Endianess::Little => { $buffer.append(&mut LittleEndian::$func(*$val)); } - Endianess::PLATFORM => + Endianess::Platform => { $buffer.append(&mut PlatformEndian::$func(*$val)); } @@ -60,17 +60,17 @@ macro_rules! handle_endianess_from_bytes { match $endianess { - Endianess::BIG => + Endianess::Big => { BigEndian::$func(&$buffer) } - Endianess::LITTLE => + Endianess::Little => { LittleEndian::$func(&$buffer) } - Endianess::PLATFORM => + Endianess::Platform => { PlatformEndian::$func(&$buffer) } @@ -441,17 +441,17 @@ impl Transmutable for String // We are not using the macro because *String is a str. match endianess { - Endianess::BIG => + Endianess::Big => { buffer.append(&mut BigEndian::string_to_bytes(temp)); } - Endianess::LITTLE => + Endianess::Little => { buffer.append(&mut LittleEndian::string_to_bytes(temp)); } - Endianess::PLATFORM => + Endianess::Platform => { buffer.append(&mut PlatformEndian::string_to_bytes(temp)); }