fn try_remove_expired_items(&mut self, now: SystemTime) {
        if let Some(frequency) = self.scan_freq {
            let since = now
                .duration_since(self.last_scan_at.unwrap_or(self.created_at))
                .expect("System time is before the scanned time");

            if since >= frequency {
                self.table.retain(|_, value| !value.has_expired(now));

                self.last_scan_at = Some(now)
            }
        }
    }
/// attempts to remove expired items based on the current system time provided.
attempts to remove expired items based on the current system time provided.
attempts to remove expired items based on the current system time provided .
fn try_remove_expired_items(&mut self, now: SystemTime) {
        if let Some(frequency) = self.scan_freq {
            let since = now
                .duration_since(self.last_scan_at.unwrap_or(self.created_at))
                .expect("System time is before the scanned time");
            if since >= frequency {
                self.table.retain(|_, value| !value.has_expired(now));
                self.last_scan_at = Some(now)
            }
        }
    }
fn try_remove_expired_items ( & mut self , now : SystemTime ) { if let Some ( frequency ) = self . scan_freq { let since = now . duration_since ( self . last_scan_at . unwrap_or ( self . created_at ) ) . expect ( " " ) ; if since >= frequency { self . table . retain ( | _ , value | ! value . has_expired ( now ) ) ; self . last_scan_at = Some ( now ) } } }
attempts to remove expired items based on the current system time provided.
attempts to remove expired items based on the current system time provided .
&mut self
now
SystemTime
&mut self
now
SystemTime