From e1667ed802da45e7a0a062efda8d9d10ee883c35 Mon Sep 17 00:00:00 2001 From: Stu Hood Date: Wed, 21 Aug 2019 17:15:17 -0700 Subject: [PATCH] Switch to rust 1.37.0 (#8192) --- rust-toolchain | 2 +- src/rust/engine/fs/src/lib.rs | 2 +- src/rust/engine/fs/store/src/snapshot.rs | 8 ++++---- src/rust/engine/process_execution/src/speculate.rs | 2 +- src/rust/engine/serverset/src/lib.rs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rust-toolchain b/rust-toolchain index d70132e1dea..bf50e910e62 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.36.0 \ No newline at end of file +1.37.0 diff --git a/src/rust/engine/fs/src/lib.rs b/src/rust/engine/fs/src/lib.rs index a5db59d9e57..7178f5e15fd 100644 --- a/src/rust/engine/fs/src/lib.rs +++ b/src/rust/engine/fs/src/lib.rs @@ -627,7 +627,7 @@ impl PosixFS { .read_dir()? .map(|readdir| { let dir_entry = readdir?; - let (file_type, compute_metadata): (_, Box Result<_, _>>) = + let (file_type, compute_metadata): (_, Box Result<_, _>>) = match self.symlink_behavior { SymlinkBehavior::Aware => { // Use the dir_entry metadata, which is symlink aware. diff --git a/src/rust/engine/fs/store/src/snapshot.rs b/src/rust/engine/fs/store/src/snapshot.rs index 64e43853ae0..7f218c01ac1 100644 --- a/src/rust/engine/fs/store/src/snapshot.rs +++ b/src/rust/engine/fs/store/src/snapshot.rs @@ -407,10 +407,10 @@ impl Snapshot { let files: Vec<_> = dir.get_files().iter().map(|file| file.get_name().to_owned()).collect(); match (saw_matching_dir, extra_directories.is_empty() && files.is_empty()) { - (false, true) => return futures::future::ok(futures::future::Loop::Break(bazel_protos::remote_execution::Directory::new())).to_boxed(), + (false, true) => futures::future::ok(futures::future::Loop::Break(bazel_protos::remote_execution::Directory::new())).to_boxed(), (false, false) => { // Prefer "No subdirectory found" error to "had extra files" error. - return futures::future::err(format!( + futures::future::err(format!( "Cannot strip prefix {} from root directory {:?} - {}directory{} didn't contain a directory named {}{}", already_stripped.join(&prefix).display(), root_digest, @@ -421,14 +421,14 @@ impl Snapshot { )).to_boxed() }, (true, false) => { - return futures::future::err(format!( + futures::future::err(format!( "Cannot strip prefix {} from root directory {:?} - {}directory{} contained non-matching {}", already_stripped.join(&prefix).display(), root_digest, if has_already_stripped_any { "sub" } else { "root " }, if has_already_stripped_any { format!(" {}", already_stripped.display()) } else { String::new() }, Self::directories_and_files(&extra_directories, &files), - )).to_boxed(); + )).to_boxed() }, (true, true) => { // Must be 0th index, because we've checked that we saw a matching directory, and no others. diff --git a/src/rust/engine/process_execution/src/speculate.rs b/src/rust/engine/process_execution/src/speculate.rs index 02e8ddf0e66..5a7e9e1b1ee 100644 --- a/src/rust/engine/process_execution/src/speculate.rs +++ b/src/rust/engine/process_execution/src/speculate.rs @@ -155,7 +155,7 @@ mod tests { is_err: bool, call_counter: Arc>, ) -> DelayedCommandRunner { - let mut result; + let result; if is_err { result = Err(msg.into()); } else { diff --git a/src/rust/engine/serverset/src/lib.rs b/src/rust/engine/serverset/src/lib.rs index 8507d94c69f..f070f70b333 100644 --- a/src/rust/engine/serverset/src/lib.rs +++ b/src/rust/engine/serverset/src/lib.rs @@ -92,7 +92,7 @@ struct Inner { // connection will be used. next_connection: usize, - connect: Box T + 'static + Send>, + connect: Box T + 'static + Send>, connection_limit: usize, @@ -532,7 +532,7 @@ mod tests { let start = std::time::Instant::now(); // This should take at least 20ms because both servers are marked as unhealthy. - runtime.block_on(s.next()).unwrap(); + let _ = runtime.block_on(s.next()).unwrap(); // Make sure we waited for at least 10ms; we should have waited 20ms, but it may have taken a // little time to mark a server as unhealthy, so we have some padding between what we expect