mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-10-08 23:02:03 +02:00
Clean up and unify exercises
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
// generics1.rs
|
||||
//
|
||||
// This shopping list program isn't compiling! Use your knowledge of generics to
|
||||
// fix it.
|
||||
//
|
||||
// Execute `rustlings hint generics1` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
fn main() {
|
||||
let mut shopping_list: Vec<?> = Vec::new();
|
||||
|
@@ -1,10 +1,5 @@
|
||||
// generics2.rs
|
||||
//
|
||||
// This powerful wrapper provides the ability to store a positive integer value.
|
||||
// Rewrite it using generics so that it supports wrapping ANY type.
|
||||
//
|
||||
// Execute `rustlings hint generics2` or use the `hint` watch subcommand for a
|
||||
// hint.
|
||||
|
||||
struct Wrapper {
|
||||
value: u32,
|
||||
|
Reference in New Issue
Block a user