diff --git a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/src/main.rs b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/src/main.rs index 814fddc509..df33743f78 100644 --- a/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/src/main.rs +++ b/listings/ch10-generic-types-traits-and-lifetimes/listing-10-05/src/main.rs @@ -1,5 +1,5 @@ fn largest(list: &[T]) -> &T { - let mut largest = list[0]; + let mut largest = &list[0]; for item in list { if item > largest {