diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-10-12 16:16:00 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-10-19 09:45:45 +0200 |
| commit | d28aed6dc45ffccc790469cb04f3f775ddb2283a (patch) | |
| tree | c1a3c356ba1ffc8173746e03f0f630ae4032624f /src/libstd/build.rs | |
| parent | cb5e1b93e300cf9772a24c6de27d9f21cdae3123 (diff) | |
| download | rust-d28aed6dc45ffccc790469cb04f3f775ddb2283a.tar.gz rust-d28aed6dc45ffccc790469cb04f3f775ddb2283a.zip | |
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations
Diffstat (limited to 'src/libstd/build.rs')
| -rw-r--r-- | src/libstd/build.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/build.rs b/src/libstd/build.rs index 0831e29bddd..b3851d22841 100644 --- a/src/libstd/build.rs +++ b/src/libstd/build.rs @@ -97,8 +97,8 @@ fn build_libbacktrace(target: &str) -> Result<(), ()> { .file("../libbacktrace/sort.c") .file("../libbacktrace/state.c"); - let any_debug = env::var("RUSTC_DEBUGINFO").unwrap_or(String::new()) == "true" || - env::var("RUSTC_DEBUGINFO_LINES").unwrap_or(String::new()) == "true"; + let any_debug = env::var("RUSTC_DEBUGINFO").unwrap_or_default() == "true" || + env::var("RUSTC_DEBUGINFO_LINES").unwrap_or_default() == "true"; build.debug(any_debug); if target.contains("darwin") { |
