Skip to content

Commit

Permalink
Merge pull request #4630 from eguiraud/patch-1
Browse files Browse the repository at this point in the history
Prefer ok_or to ok_or_else in README example
  • Loading branch information
epage authored Jan 11, 2023
2 parents 37d03bb + 8431461 commit 72749a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clap_mangen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ clap_mangen = "0.1"
In your `build.rs`:
```rust,no_run
fn main() -> std::io::Result<()> {
let out_dir = std::path::PathBuf::from(std::env::var_os("OUT_DIR").ok_or_else(|| std::io::ErrorKind::NotFound)?);
let out_dir = std::path::PathBuf::from(std::env::var_os("OUT_DIR").ok_or(std::io::ErrorKind::NotFound)?);
let cmd = clap::Command::new("mybin")
.arg(clap::arg!(-n --name <NAME>))
Expand Down

0 comments on commit 72749a3

Please sign in to comment.