Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to rust 1.37.0 #8192

Merged
merged 4 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.36.0
1.37.0
2 changes: 1 addition & 1 deletion src/rust/engine/fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ impl PosixFS {
.read_dir()?
.map(|readdir| {
let dir_entry = readdir?;
let (file_type, compute_metadata): (_, Box<FnOnce() -> Result<_, _>>) =
let (file_type, compute_metadata): (_, Box<dyn FnOnce() -> Result<_, _>>) =
match self.symlink_behavior {
SymlinkBehavior::Aware => {
// Use the dir_entry metadata, which is symlink aware.
Expand Down
8 changes: 4 additions & 4 deletions src/rust/engine/fs/store/src/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/process_execution/src/speculate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ mod tests {
is_err: bool,
call_counter: Arc<Mutex<u32>>,
) -> DelayedCommandRunner {
let mut result;
let result;
if is_err {
result = Err(msg.into());
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/serverset/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct Inner<T: Clone> {
// connection will be used.
next_connection: usize,

connect: Box<Fn(&str) -> T + 'static + Send>,
connect: Box<dyn Fn(&str) -> T + 'static + Send>,

connection_limit: usize,

Expand Down