Skip to content

Commit

Permalink
Update to rust 1.79
Browse files Browse the repository at this point in the history
Fixes Use newer version of rustc in CI #319
  • Loading branch information
mwillsey committed Jul 8, 2024
1 parent 7112033 commit dae3050
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.60
1.79
6 changes: 3 additions & 3 deletions src/dot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ where
/// Renders the `Dot` to a .png file with the given filename.
/// Requires a `dot` binary to be on your `$PATH`.
pub fn to_png(&self, filename: impl AsRef<Path>) -> Result<()> {
self.run_dot(&["-Tpng".as_ref(), "-o".as_ref(), filename.as_ref()])
self.run_dot(["-Tpng".as_ref(), "-o".as_ref(), filename.as_ref()])
}

/// Renders the `Dot` to a .svg file with the given filename.
/// Requires a `dot` binary to be on your `$PATH`.
pub fn to_svg(&self, filename: impl AsRef<Path>) -> Result<()> {
self.run_dot(&["-Tsvg".as_ref(), "-o".as_ref(), filename.as_ref()])
self.run_dot(["-Tsvg".as_ref(), "-o".as_ref(), filename.as_ref()])
}

/// Renders the `Dot` to a .pdf file with the given filename.
/// Requires a `dot` binary to be on your `$PATH`.
pub fn to_pdf(&self, filename: impl AsRef<Path>) -> Result<()> {
self.run_dot(&["-Tpdf".as_ref(), "-o".as_ref(), filename.as_ref()])
self.run_dot(["-Tpdf".as_ref(), "-o".as_ref(), filename.as_ref()])
}

/// Invokes `dot` with the given arguments, piping this formatted
Expand Down
6 changes: 2 additions & 4 deletions src/egraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ same e-class.
You can use the `egraph[id]` syntax to get an [`EClass`] from an [`Id`], because
[`EGraph`] implements
[`Index`](struct.EGraph.html#impl-Index<Id>)
and
[`IndexMut`](struct.EGraph.html#impl-IndexMut<Id>).
`Index` and `IndexMut`.
Enabling the `serde-1` feature on this crate will allow you to
de/serialize [`EGraph`]s using [`serde`](https://serde.rs/).
Expand Down Expand Up @@ -765,7 +763,7 @@ pub struct SimpleLanguageMapper<L2, A2> {
impl<L, A> Default for SimpleLanguageMapper<L, A> {
fn default() -> Self {
SimpleLanguageMapper {
_phantom: PhantomData::default(),
_phantom: PhantomData,
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/explain.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::only_used_in_recursion)]
use crate::Symbol;
use crate::{
util::pretty_print, Analysis, EClass, ENodeOrVar, FromOp, HashMap, HashSet, Id, Language,
Expand Down Expand Up @@ -375,11 +376,11 @@ impl<L: Language> Explanation<L> {

/// Check the validity of the explanation with respect to the given rules.
/// This only is able to check rule applications when the rules are implement `get_pattern_ast`.
pub fn check_proof<'a, R, N: Analysis<L>>(&mut self, rules: R)
pub fn check_proof<'a, R, N>(&mut self, rules: R)
where
R: IntoIterator<Item = &'a Rewrite<L, N>>,
L: 'a,
N: 'a,
N: Analysis<L> + 'a,
{
let rules: Vec<&Rewrite<L, N>> = rules.into_iter().collect();
let rule_table = Explain::make_rule_table(rules.as_slice());
Expand Down Expand Up @@ -1407,8 +1408,7 @@ impl<'x, L: Language> ExplainNodes<'x, L> {
let mut enodes = HashSet::default();
let mut todo = vec![eclass];

while !todo.is_empty() {
let current = todo.pop().unwrap();
while let Some(current) = todo.pop() {
if enodes.insert(current) {
for neighbor in &self.explainfind[usize::from(current)].neighbors {
todo.push(neighbor.next);
Expand Down

0 comments on commit dae3050

Please sign in to comment.