diff options
| author | varkor <github@varkor.com> | 2019-12-06 12:18:32 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-12-06 12:24:54 +0000 |
| commit | 9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c (patch) | |
| tree | a7b18394302ae6733495354966b81188380a5ea8 /src/libtest/lib.rs | |
| parent | 8579fe6fc3a28e5a7cbd95ada3a3305a73782c82 (diff) | |
| download | rust-9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c.tar.gz rust-9f1269f23c5f0c1c6a53118b51cf52415ac0bb1c.zip | |
Rename to `then_some` and `then`
Diffstat (limited to 'src/libtest/lib.rs')
| -rw-r--r-- | src/libtest/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 9ff9e382c88..2e90750b7a0 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -563,7 +563,7 @@ fn run_test_in_process( None }; - let start = report_time.to_option(Instant::now()); + let start = report_time.then_some(Instant::now()); let result = catch_unwind(AssertUnwindSafe(testfn)); let exec_time = start.map(|start| { let duration = start.elapsed(); @@ -594,7 +594,7 @@ fn spawn_test_subprocess( let args = env::args().collect::<Vec<_>>(); let current_exe = &args[0]; - let start = report_time.to_option(Instant::now()); + let start = report_time.then_some(Instant::now()); let output = match Command::new(current_exe) .env(SECONDARY_TEST_INVOKER_VAR, desc.name.as_slice()) .output() { |
