about summary refs log tree commit diff
path: root/src/librustc_interface/util.rs
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2019-12-06 12:18:32 +0000
committervarkor <github@varkor.com>2019-12-06 12:24:54 +0000
commit9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c (patch)
treea7b18394302ae6733495354966b81188380a5ea8 /src/librustc_interface/util.rs
parent8579fe6fc3a28e5a7cbd95ada3a3305a73782c82 (diff)
downloadrust-9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c.tar.gz
rust-9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c.zip
Rename to `then_some` and `then`
Diffstat (limited to 'src/librustc_interface/util.rs')
-rw-r--r--src/librustc_interface/util.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_interface/util.rs b/src/librustc_interface/util.rs
index 3d227f91ed6..8c225b83f40 100644
--- a/src/librustc_interface/util.rs
+++ b/src/librustc_interface/util.rs
@@ -107,7 +107,7 @@ const STACK_SIZE: usize = 16 * 1024 * 1024;
 fn get_stack_size() -> Option<usize> {
     // FIXME: Hacks on hacks. If the env is trying to override the stack size
     // then *don't* set it explicitly.
-    env::var_os("RUST_MIN_STACK").is_none().to_option(STACK_SIZE)
+    env::var_os("RUST_MIN_STACK").is_none().then_some(STACK_SIZE)
 }
 
 struct Sink(Arc<Mutex<Vec<u8>>>);
@@ -281,7 +281,7 @@ fn get_rustc_path_inner(bin_path: &str) -> Option<PathBuf> {
             } else {
                 "rustc"
             });
-            candidate.exists().to_option(candidate)
+            candidate.exists().then_some(candidate)
         })
         .next()
 }