mirror of https://github.com/rust-lang/rustlings
Merge branch 'new' of https://github.com/rustlings/rustlings into new
commit
ab5472baa3
@ -0,0 +1,4 @@
|
||||
## Welcome to Rustlings!
|
||||
|
||||
To get started, run `rustlings verify` in order to get the first exercise.
|
||||
Make sure to have your editor open!
|
@ -0,0 +1,47 @@
|
||||
// ex6.rs
|
||||
// Make me compile! Scroll down for hints :)
|
||||
|
||||
fn main() {
|
||||
let robot_name = Some(String::from("Bors"));
|
||||
|
||||
match robot_name {
|
||||
Some(name) => println!("Found a name: {}", name),
|
||||
None => (),
|
||||
}
|
||||
|
||||
println!("robot_name is: {:?}", robot_name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Hint: The following two statements are equivalent:
|
||||
// let x = &y;
|
||||
// let ref x = y;
|
Loading…
Reference in New Issue