4 ms·
You need to specify the properties of T that you use. So, that first line should be: fn largest<T: PartialOrd + Copy>(list: &[T]) -> T { https://tomtongue.c
by slavik81 7y ago
You need to specify the properties of T that you use. So, that first line should be:
fn largest<T: PartialOrd + Copy>(list: &[T]) -> T {
https://tomtongue.com/docs/rust-wk-20.html#trait-bounds https://tomtongue.com/docs/rust-wk-20.html#trait-bounds