aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-06-05 22:01:02 +0200
committerJonas Maier <jonas@x77.dev>2026-06-05 22:01:02 +0200
commitf06e116154bd6da5b7b3496e4ee23b5bd96745d3 (patch)
tree15e41fca2302e6d9c479c045c618f1100e6ec70b
parent39a849c46cc61cacc84c1d9a7e5c2c05bcf51f1a (diff)
downloadpish-f06e116154bd6da5b7b3496e4ee23b5bd96745d3.tar.gz
clippy
-rw-r--r--src/parse/regex/dfa.rs2
-rw-r--r--src/parse/regex/enfa.rs2
-rw-r--r--src/parse/regex/mod.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/parse/regex/dfa.rs b/src/parse/regex/dfa.rs
index db63953..35f726c 100644
--- a/src/parse/regex/dfa.rs
+++ b/src/parse/regex/dfa.rs
@@ -208,7 +208,7 @@ use state_set::StateSet;
trait GoesTo {
fn goes_to(&self, to: usize) -> bool;
}
-impl<'a> GoesTo for (&'a State, ByteRange) {
+impl GoesTo for (&State, ByteRange) {
fn goes_to(&self, target: usize) -> bool {
let from = self.0;
let ch = self.1;
diff --git a/src/parse/regex/enfa.rs b/src/parse/regex/enfa.rs
index dd3839f..ff742e0 100644
--- a/src/parse/regex/enfa.rs
+++ b/src/parse/regex/enfa.rs
@@ -218,7 +218,7 @@ impl Thread {
let mut positives = positives.clone();
let mut negatives = negatives.clone();
positives.append(&mut p);
- negatives.append(&mut n.iter().cloned().flatten().collect());
+ negatives.append(&mut n.iter().flatten().cloned().collect());
if let Some(thread) = Self::new(enfa, state, positives, negatives) {
ret(thread);
}
diff --git a/src/parse/regex/mod.rs b/src/parse/regex/mod.rs
index 6b7bc9e..fed792c 100644
--- a/src/parse/regex/mod.rs
+++ b/src/parse/regex/mod.rs
@@ -79,7 +79,7 @@ impl ByteConsumption {
impl Ord for ByteConsumption {
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
match (self, other) {
- (Self::Bounded(a), Self::Bounded(b)) => a.cmp(&b),
+ (Self::Bounded(a), Self::Bounded(b)) => a.cmp(b),
(Self::Bounded(_), Self::Unbounded) => std::cmp::Ordering::Less,
(Self::Unbounded, Self::Bounded(_)) => std::cmp::Ordering::Greater,
(Self::Unbounded, Self::Unbounded) => std::cmp::Ordering::Equal,