From 1c5e2557e2eb3992c320b658ef117cb578bc6fe1 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 15 Apr 2019 15:30:21 -0700 Subject: 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 Tested-by: David Tolnay Tested-by: kokoro Reviewed-by: Daniel Verkamp --- tests/plugins.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'tests') 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"); -- cgit 1.4.1