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:
@ -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);
|
||||
|
Reference in New Issue
Block a user