3 releases

Uses old Rust 2015

0.1.2 Apr 29, 2018
0.1.1 Apr 11, 2018
0.1.0 Apr 10, 2018

#5 in #as

Download history 21/week @ 2021-10-05 23/week @ 2021-10-12 29/week @ 2021-10-19 23/week @ 2021-10-26 32/week @ 2021-11-02 11/week @ 2021-11-09 29/week @ 2021-11-16 35/week @ 2021-11-23 47/week @ 2021-11-30 52/week @ 2021-12-07 47/week @ 2021-12-14 23/week @ 2021-12-21 37/week @ 2021-12-28 37/week @ 2022-01-04 64/week @ 2022-01-11 80/week @ 2022-01-18

220 downloads per month
Used in 18 crates (7 directly)

MIT license

6KB
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);

No runtime deps