Skip to content

Commit

Permalink
docs: prefer ok_or to ok_or_else in README example
Browse files Browse the repository at this point in the history
As suggested by clippy when using the example code.
  • Loading branch information
eguiraud committed Jan 11, 2023
1 parent 37d03bb commit 8431461
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 8431461

Please sign in to comment.