mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-11 13:19:18 +00:00
if anf whlie let statement
This commit is contained in:
parent
f872682252
commit
497dfdd372
@ -31,10 +31,6 @@ mod tests {
|
|||||||
while let Some(Some(integer)) = optional_integers.pop() {
|
while let Some(Some(integer)) = optional_integers.pop() {
|
||||||
assert_eq!(integer, range);
|
assert_eq!(integer, range);
|
||||||
range -= 1;
|
range -= 1;
|
||||||
// You can stack `Option<T>`s into while let and if let
|
|
||||||
integer = optional_integers.pop() {
|
|
||||||
assert_eq!(integer, cursor);
|
|
||||||
cursor -= 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_eq!(cursor, 0);
|
assert_eq!(cursor, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user