mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 13:19:18 +00:00
Started work on generics
This commit is contained in:
parent
c11a76cdf7
commit
08fd649796
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
// Execute `rustlings hint generics1` for hints!
|
// Execute `rustlings hint generics1` for hints!
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut shopping_list: Vec<?> = Vec::new();
|
let mut shopping_list: Vec<&str> = Vec::new(); // Just needed the type to expect at compile time
|
||||||
shopping_list.push("milk");
|
shopping_list.push("milk");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user