pool: simpler admission guard (clippy)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-31 06:58:55 +01:00
commit 99d3c05b09

View file

@ -64,7 +64,7 @@ impl<E: Embedder + Send> EmbedderPool<E> {
fn admit(&mut self, within: Duration) {
let now = Instant::now();
for at in 0..self.members.len() {
if !self.members[at].out.as_ref().is_some_and(|(due, _)| *due <= now) {
if self.members[at].out.as_ref().is_none_or(|(due, _)| *due > now) {
continue;
}
let name = self.members[at].name.clone();