generated from PlexSheep/rs-base
fix(naive): improve found character indexing #2
cargo devel CI / cargo CI (push) Failing after 1m53s
Details
cargo devel CI / cargo CI (push) Failing after 1m53s
Details
This commit is contained in:
parent
4b7e9433b9
commit
845fd73040
|
@ -72,14 +72,11 @@ impl<'wl, WL: WordList> Solver<'wl, WL> for NaiveSolver<'wl, WL> {
|
|||
already_tried.push((*spot, *other.0));
|
||||
}
|
||||
|
||||
if p.0
|
||||
.char_indices()
|
||||
.filter(|ci| ci.1 == *other.0 && !already_tried.contains(ci))
|
||||
.count()
|
||||
< 1
|
||||
{
|
||||
for c in p.0.char_indices() {
|
||||
if c.1 == *other.0 && other.1.contains(&c.0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue