very small solution update

This commit is contained in:
Kacper Poneta 2024-07-11 22:55:48 +02:00
parent 55cc8584bd
commit 938b90e5f2

View file

@ -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<T>(list: &Vec<T>) -> String
fn stringify<T>(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
{