You want to use generics here: fn find_min<'a, I>(vals: I) -> Option<&'a u32> where I: Iterator<Item = &'a u32>, { vals.min() }.
確定! 回上一頁