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

Upgrade to Rust stable 1.47.0. #10933

Merged
merged 2 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from all 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.46.0
1.47.0
15 changes: 3 additions & 12 deletions src/rust/engine/fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@ impl GitignoreStyleExcludes {
}

fn is_ignored(&self, stat: &Stat) -> bool {
let is_dir = match stat {
&Stat::Dir(_) => true,
_ => false,
};
let is_dir = matches!(stat, &Stat::Dir(_));
self.is_ignored_path(stat.path(), is_dir)
}

Expand Down Expand Up @@ -357,17 +354,11 @@ impl StrictGlobMatching {
}

pub fn should_check_glob_matches(&self) -> bool {
match self {
&StrictGlobMatching::Ignore => false,
_ => true,
}
!matches!(self, &StrictGlobMatching::Ignore)
}

pub fn should_throw_on_error(&self) -> bool {
match self {
&StrictGlobMatching::Error(_) => true,
_ => false,
}
matches!(self, &StrictGlobMatching::Error(_))
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/rust/engine/graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,13 +686,9 @@ impl<N: Node> Graph<N> {
) -> Result<Vec<Generation>, N::Error> {
let generations = {
let inner = self.inner.lock();
let dep_ids = inner
inner
.pg
.neighbors_directed(entry_id, Direction::Outgoing)
.collect::<Vec<_>>();

dep_ids
.into_iter()
.map(|dep_id| {
let mut entry = inner
.entry_for_id(dep_id)
Expand Down
12 changes: 7 additions & 5 deletions src/rust/engine/rule_graph/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,11 +1015,13 @@ impl<R: Rule> Builder<R> {
to_visit.extend(
edge_refs
.iter()
.filter(|edge_ref| match graph[edge_ref.target()].deleted_reason() {
Some(NodePrunedReason::Ambiguous)
| Some(NodePrunedReason::NoSourceOfParam)
| Some(NodePrunedReason::NoValidCombinationsOfDependencies) => true,
_ => false,
.filter(|edge_ref| {
matches!(
graph[edge_ref.target()].deleted_reason(),
Some(NodePrunedReason::Ambiguous)
| Some(NodePrunedReason::NoSourceOfParam)
| Some(NodePrunedReason::NoValidCombinationsOfDependencies)
)
})
.map(|edge_ref| edge_ref.target()),
);
Expand Down