Skip to content

Commit 8431461

Browse files
committed
docs: prefer ok_or to ok_or_else in README example
As suggested by clippy when using the example code.
1 parent 37d03bb commit 8431461

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clap_mangen/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ clap_mangen = "0.1"
3434
In your `build.rs`:
3535
```rust,no_run
3636
fn main() -> std::io::Result<()> {
37-
let out_dir = std::path::PathBuf::from(std::env::var_os("OUT_DIR").ok_or_else(|| std::io::ErrorKind::NotFound)?);
37+
let out_dir = std::path::PathBuf::from(std::env::var_os("OUT_DIR").ok_or(std::io::ErrorKind::NotFound)?);
3838
3939
let cmd = clap::Command::new("mybin")
4040
.arg(clap::arg!(-n --name <NAME>))

0 commit comments

Comments
 (0)