mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 21:29:18 +00:00
working on rustlings
This commit is contained in:
parent
7f1754ecc5
commit
e64fcacd66
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -459,7 +459,7 @@ checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustlings"
|
name = "rustlings"
|
||||||
version = "5.4.0"
|
version = "5.4.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argh",
|
"argh",
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
|
|||||||
@ -5,6 +5,6 @@
|
|||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
x = 5;
|
let x = 5;
|
||||||
println!("x has the value {}", x);
|
println!("x has the value {}", x);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x;
|
let x: i32 = 20;
|
||||||
if x == 10 {
|
if x == 10 {
|
||||||
println!("x is ten!");
|
println!("x is ten!");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x: i32;
|
let x: i32 = 5;
|
||||||
println!("Number {}", x);
|
let y: i32 = 10;
|
||||||
|
println!("Number {}", y);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let x = 3;
|
let mut x: i32 = 3;
|
||||||
println!("Number {}", x);
|
println!("Number {}", x);
|
||||||
x = 5; // don't change this line
|
x = 5; // don't change this line
|
||||||
println!("Number {}", x);
|
println!("Number {}", x);
|
||||||
|
|||||||
@ -6,6 +6,6 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
let number = "T-H-R-E-E"; // don't change this line
|
let number = "T-H-R-E-E"; // don't change this line
|
||||||
println!("Spell a Number : {}", number);
|
println!("Spell a Number : {}", number);
|
||||||
number = 3; // don't rename this variable
|
let number = 3; // don't rename this variable
|
||||||
println!("Number plus two is : {}", number + 2);
|
println!("Number plus two is : {}", number + 2);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
// I AM NOT DONE
|
// I AM NOT DONE
|
||||||
|
|
||||||
const NUMBER = 3;
|
const NUMBER: u32 = 3;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
println!("Number {}", NUMBER);
|
println!("Number {}", NUMBER);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user