Skip to content

Rollup of 3 pull requests #30103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/doc/book/if-let.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ if let Some(x) = option {
## `while let`

In a similar fashion, `while let` can be used when you want to conditionally
loop as long as a value matches a certain pattern. It turns code like this:
loop as long as a value matches a certain pattern. It turns code like this:

```rust
# let option: Option<i32> = None;
let mut v = vec![1, 3, 5, 7, 11];
loop {
match option {
Some(x) => println!("{}", x),
match v.pop() {
Some(x) => println!("{}", x),
None => break,
}
}
Expand All @@ -73,8 +73,8 @@ loop {
Into code like this:

```rust
# let option: Option<i32> = None;
while let Some(x) = option {
let mut v = vec![1, 3, 5, 7, 11];
while let Some(x) = v.pop() {
println!("{}", x);
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ fn _remove_var(k: &OsStr) {
})
}

/// An iterator over `Path` instances for parsing an environment variable
/// An iterator over `PathBuf` instances for parsing an environment variable
/// according to platform-specific conventions.
///
/// This structure is returned from `std::env::split_paths`.
Expand Down