mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-01-11 00:00:04 +03:00
Compare commits
No commits in common. "990c68efcba8e1e2b7f2d8c5b6c16885d3920010" and "f2c3dcab3ac20e5aeddc7f792409727803da8bb8" have entirely different histories.
990c68efcb
...
f2c3dcab3a
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -506,9 +506,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.12.3"
|
version = "0.12.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"parking_lot_core",
|
"parking_lot_core",
|
||||||
|
@ -825,9 +825,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.66"
|
version = "2.0.65"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
|
checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
|
// Fill in the rest of the line that has code missing!
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
// Booleans (`bool`)
|
||||||
|
|
||||||
let is_morning = true;
|
let is_morning = true;
|
||||||
if is_morning {
|
if is_morning {
|
||||||
println!("Good morning!");
|
println!("Good morning!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Define a boolean variable with the name `is_evening` before the `if` statement below.
|
let // Finish the rest of this line like the example! Or make it be false!
|
||||||
// The value of the variable should be the negation (opposite) of `is_morning`.
|
|
||||||
// let …
|
|
||||||
if is_evening {
|
if is_evening {
|
||||||
println!("Good evening!");
|
println!("Good evening!");
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,10 +234,7 @@ hint = "No hints this time ;)"
|
||||||
name = "primitive_types1"
|
name = "primitive_types1"
|
||||||
dir = "04_primitive_types"
|
dir = "04_primitive_types"
|
||||||
test = false
|
test = false
|
||||||
hint = """
|
hint = "No hints this time ;)"
|
||||||
In Rust, a boolean can be negated using the operator `!` before it.
|
|
||||||
Example: `!true == false`
|
|
||||||
This also works with boolean variables."""
|
|
||||||
|
|
||||||
[[exercises]]
|
[[exercises]]
|
||||||
name = "primitive_types2"
|
name = "primitive_types2"
|
||||||
|
|
|
@ -1,11 +1 @@
|
||||||
fn main() {
|
// Solutions will be available before the stable release. Thank you for testing the beta version 🥰
|
||||||
let is_morning = true;
|
|
||||||
if is_morning {
|
|
||||||
println!("Good morning!");
|
|
||||||
}
|
|
||||||
|
|
||||||
let is_evening = !is_morning;
|
|
||||||
if is_evening {
|
|
||||||
println!("Good evening!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue