Skip to content

Commit

Permalink
Upgrade to Rust stable 1.47.0. (#10933)
Browse files Browse the repository at this point in the history
The changelog is here:
https://blog.rust-lang.org/2020/10/08/Rust-1.47.html

The most relevant change is shorter backtraces by default:
https://blog.rust-lang.org/2020/10/08/Rust-1.47.html#shorter-backtraces
  • Loading branch information
jsirois authored Oct 9, 2020
1 parent cd22820 commit a1521c3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
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

0 comments on commit a1521c3

Please sign in to comment.