Skip to content

Commit

Permalink
clippy: lazy evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
AnderEnder committed Jan 26, 2020
1 parent fe137c8 commit 4d4b9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fn main() {
exit(1);
}

let var = std::env::var_os("SHELL_COMPLETIONS_DIR").or(std::env::var_os("OUT_DIR"));
let var = std::env::var_os("SHELL_COMPLETIONS_DIR").or_else(|| std::env::var_os("OUT_DIR"));
let outdir = match var {
None => return,
Some(outdir) => outdir,
Expand Down

0 comments on commit 4d4b9ee

Please sign in to comment.