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:
Jason Travis Smith
2016-01-05 23:42:08 -05:00
parent e7f2f252fa
commit d9a3e21aec
3 changed files with 12 additions and 8 deletions

View File

@ -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)
}
}