Add conversions from `bool` in `AsPrimitive`

This commit is contained in:
Eduardo Pinho 2017-12-20 21:41:45 +00:00
parent 741e1f4e09
commit 773a222237
1 changed files with 1 additions and 0 deletions

View File

@ -493,6 +493,7 @@ impl_as_primitive!(isize => u8, i8, u16, i16, u32, i32, u64, isize, usize, i64,
impl_as_primitive!(f32 => u8, i8, u16, i16, u32, i32, u64, isize, usize, i64, f32, f64);
impl_as_primitive!(f64 => u8, i8, u16, i16, u32, i32, u64, isize, usize, i64, f32, f64);
impl_as_primitive!(char => char, u8, i8, u16, i16, u32, i32, u64, isize, usize, i64);
impl_as_primitive!(bool => u8, i8, u16, i16, u32, i32, u64, isize, usize, i64);
#[test]
fn to_primitive_float() {