From 7bf2fd90d486d752bd37b2a90dcf6df37a77beed Mon Sep 17 00:00:00 2001 From: hatoo Date: Mon, 21 Aug 2023 14:09:38 +0900 Subject: [PATCH] Chore: Update rust-toolchain - Applied cargo clippy --fix --- rust-toolchain | 1 - rust-toolchain.toml | 2 ++ src/termdag.rs | 4 +--- 3 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 rust-toolchain create mode 100644 rust-toolchain.toml diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index bfe79d0b..00000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.70 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..e6d1df7a --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "1.71.1" diff --git a/src/termdag.rs b/src/termdag.rs index cd490e8f..d028e5a9 100644 --- a/src/termdag.rs +++ b/src/termdag.rs @@ -113,9 +113,7 @@ impl TermDag { let id = self.lookup(term); // use a stack to avoid stack overflow let mut stack = vec![id]; - while !stack.is_empty() { - let next = stack.pop().unwrap(); - + while let Some(next) = stack.pop() { match self.nodes[next].clone() { Term::App(name, children) => { if seen.contains(&next) {