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

@ -3,21 +3,18 @@
extern crate alchemy;
use std::f32;
use alchemy::{PlatformEndian, Transmutable};
use alchemy::{Converter, PlatformEndian};
pub fn main()
{
let num: f32;
let mut final_num: f32;
let final_num: f32;
let mut buffer: [u8; 4];
// Initialize the variables.
num = 6.291985f32;
final_num = f32::NAN;
buffer = [0u8; 4];
println!("Converting the value {} into and out of an array of bytes.", num);