From 938b90e5f26b95aad4e11109015463bb03cd3e5f Mon Sep 17 00:00:00 2001 From: Kacper Poneta Date: Thu, 11 Jul 2024 22:55:48 +0200 Subject: [PATCH] very small solution update --- solutions/14_generics/generics3.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {