Compare commits
12 commits
21a351914f
...
852f5a9b76
Author | SHA1 | Date | |
---|---|---|---|
852f5a9b76 | |||
808b8f58b0 | |||
5f77f62dd9 | |||
31e890f49b | |||
99fb3a3f72 | |||
0c0b69835d | |||
fb1df42282 | |||
8b8e5ac817 | |||
683e905215 | |||
4bc2d864e1 | |||
ad1c063af0 | |||
f98580a681 |
12 changed files with 80 additions and 0 deletions
7
branches/Cargo.lock
generated
Normal file
7
branches/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "branches"
|
||||
version = "0.1.0"
|
6
branches/Cargo.toml
Normal file
6
branches/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "branches"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
9
branches/src/main.rs
Normal file
9
branches/src/main.rs
Normal file
|
@ -0,0 +1,9 @@
|
|||
fn main() {
|
||||
let number = 3;
|
||||
|
||||
if number < 5 {
|
||||
println!("condition was true");
|
||||
} else {
|
||||
println!("condition was false");
|
||||
}
|
||||
}
|
7
functions/Cargo.lock
generated
Normal file
7
functions/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "functions"
|
||||
version = "0.1.0"
|
6
functions/Cargo.toml
Normal file
6
functions/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "functions"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
7
functions/src/main.rs
Normal file
7
functions/src/main.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
fn main() {
|
||||
print_labeled_measurement(5, 'h');
|
||||
}
|
||||
|
||||
fn print_labeled_measurement(value: i32, unit_label: char) {
|
||||
println!("The measurement is: {value}{unit_label}");
|
||||
}
|
7
loops/Cargo.lock
generated
Normal file
7
loops/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "loops"
|
||||
version = "0.1.0"
|
6
loops/Cargo.toml
Normal file
6
loops/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "loops"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
6
loops/src/main.rs
Normal file
6
loops/src/main.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
for number in (1..4).rev() {
|
||||
println!("{number}!");
|
||||
}
|
||||
println!("LIFTOFF!!!");
|
||||
}
|
7
variables/Cargo.lock
generated
Normal file
7
variables/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "variables"
|
||||
version = "0.1.0"
|
6
variables/Cargo.toml
Normal file
6
variables/Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "variables"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
6
variables/src/main.rs
Normal file
6
variables/src/main.rs
Normal file
|
@ -0,0 +1,6 @@
|
|||
fn main() {
|
||||
let mut x = 5;
|
||||
println!("The value of x is: {x}");
|
||||
x = 6;
|
||||
println!("The value of x is: {x}");
|
||||
}
|
Loading…
Reference in a new issue