Making the Endian enumeration follow the standard of CamelCase names.
This commit is contained in:
parent
4291a1ef5d
commit
6ff27de3c7
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user