diff --git a/solutions/14_generics/generics3.rs b/solutions/14_generics/generics3.rs index 165fb6ad..240e1e00 100644 --- a/solutions/14_generics/generics3.rs +++ b/solutions/14_generics/generics3.rs @@ -2,7 +2,7 @@ // Execute `rustlings hint generics3` or use the `hint` watch subcommand for a hint. // Here we add generic in function declaration so function can work with different types -fn stringify(list: &Vec) -> String +fn stringify(list: &[T]) -> String where T: ToString // here we also specify that T needs to implement ToString trait so we can use .to_string() on the vetor elements {