3 releases
Uses old Rust 2015
0.1.2 | Apr 29, 2018 |
---|---|
0.1.1 | Apr 11, 2018 |
0.1.0 | Apr 10, 2018 |
#4 in #as
296 downloads per month
Used in 18 crates
(7 directly)
7KB
163 lines
rs-cast_trait
cast trait
use cast_trait::Cast;
fn cast<A, B>(a: A) -> B
where A: Cast<B>,
{
a.cast()
}
assert_eq!(cast::<i32, f32>(10_i32), 10_f32);