use encoder::number::Encode; fn main() { let mut buf = vec![]; 1_i32.encode(&mut buf); 2_u32.encode(&mut buf); 1_f32.encode(&mut buf); 2_f64.encode(&mut buf); assert_eq!(String::from_utf8_lossy(&buf), r#"121.02.0"#); assert_eq!(1_i32.stringify(), "1"); assert_eq!(2_u32.stringify(), "2"); assert_eq!(1_f32.stringify(), "1.0"); assert_eq!(2_f64.stringify(), "2.0"); }