mirror of
https://github.com/ArthurDanjou/rustlings.git
synced 2026-01-26 09:30:27 +01:00
feat: added new exercises for generics
This commit is contained in:
10
exercises/generics/generics1.rs
Normal file
10
exercises/generics/generics1.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
// This shopping list program isn't compiling!
|
||||
// Use your knowledge of generics to fix it.
|
||||
|
||||
// I AM NOT DONE
|
||||
|
||||
fn main() {
|
||||
let mut shopping_list: Vec<?> = Vec::new();
|
||||
shopping_list.push("milk");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user