Remove redundant constraint

This commit is contained in:
George Thomas 2025-12-22 14:53:22 +00:00
parent 2cf462ad9d
commit 3114920494

View File

@ -64,7 +64,7 @@ fn max_batteries(n: usize, v: &[u8]) -> Option<Vec<u8>> {
Some(result)
}
fn find_max<A: Ord + Copy>(v: &[A]) -> Option<(usize, &A)> {
fn find_max<A: Ord>(v: &[A]) -> Option<(usize, &A)> {
v.iter().enumerate().rev().max_by_key(|x| x.1)
}