diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-04-15 15:30:21 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-17 17:22:57 -0700 |
commit | 1c5e2557e2eb3992c320b658ef117cb578bc6fe1 (patch) | |
tree | 03c48568332467b36db736f8d173ead442c7963e /tests/plugins.rs | |
parent | 35ee9d918404ee87abdd23a450fdb483388e1932 (diff) | |
download | crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar.gz crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar.bz2 crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar.lz crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar.xz crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.tar.zst crosvm-1c5e2557e2eb3992c320b658ef117cb578bc6fe1.zip |
edition: Eliminate blocks superseded by NLL
Before the new borrow checker in the 2018 edition, we sometimes used to have to manually insert curly braced blocks to limit the scope of borrows. These are no longer needed. Details in: https://doc.rust-lang.org/edition-guide/rust-2018/ownership-and-lifetimes/non-lexical-lifetimes.html TEST=cargo check --all-features TEST=local kokoro Change-Id: I59f9f98dcc03c8790c53e080a527ad9b68c8d6f3 Reviewed-on: https://chromium-review.googlesource.com/1568075 Commit-Ready: David Tolnay <dtolnay@chromium.org> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'tests/plugins.rs')
-rw-r--r-- | tests/plugins.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/plugins.rs b/tests/plugins.rs index b00309f..ec094d1 100644 --- a/tests/plugins.rs +++ b/tests/plugins.rs @@ -67,12 +67,10 @@ fn build_plugin(src: &str) -> RemovePath { .stdin(Stdio::piped()) .spawn() .expect("failed to spawn compiler"); - { - let stdin = child.stdin.as_mut().expect("failed to open stdin"); - stdin - .write_all(src.as_bytes()) - .expect("failed to write source to stdin"); - } + let stdin = child.stdin.as_mut().expect("failed to open stdin"); + stdin + .write_all(src.as_bytes()) + .expect("failed to write source to stdin"); let status = child.wait().expect("failed to wait for compiler"); assert!(status.success(), "failed to build plugin"); |