Fixed the example and tests to use the new Converter trait.
Transmutable was changed to Converter. This needed to be reflected in the example and tests. Also, fixed some comments in the new transmutable module.
This commit is contained in:
@ -6,7 +6,9 @@ use ::endian::{BigEndian, LittleEndian, PlatformEndian, Endianess};
|
||||
|
||||
|
||||
|
||||
/// Handles the repetative
|
||||
/// Handles the repetative endianess matching
|
||||
/// for the primitive number types when converting
|
||||
/// a number to bytes.
|
||||
macro_rules! handle_endianess_to_bytes
|
||||
{
|
||||
($buffer: ident, $val: ident, $endianess: ident, $func: ident) =>
|
||||
@ -36,6 +38,9 @@ macro_rules! handle_endianess_to_bytes
|
||||
}
|
||||
}
|
||||
|
||||
/// Handles the repetative endianess matching
|
||||
/// for the primitive number types when converting
|
||||
/// a number from bytes.
|
||||
macro_rules! handle_endianess_from_bytes
|
||||
{
|
||||
($buffer: ident, $endianess: ident, $func: ident) =>
|
||||
@ -358,3 +363,5 @@ impl Transmutable for f64
|
||||
handle_endianess_from_bytes!(buffer, endianess, bytes_to_f64)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user