574I6K5HTOQLE5AJ54D7E7NE2R46ESVRXGSD2IN64VZS6TVNTUEAC
KCUGRTO54BZLPQJPUZNJGKM3TZOR2K3Z7SZN5SR7IZQAEOYWL4WQC
YMW2RSKMODRBEHP5ZGBQQ3ZKZQCKLGUT3F6MXSI73AK446LRNFKAC
2KXFHTS3VTQWWMOUVONFJ7GYSX4DCHQ6RQ2LGV6TH5R6X7MH7RNAC
use log::info;
use std::sync::{Mutex, OnceLock};
}// Workaround for #10static HISTORY: OnceLock<Mutex<Vec<String>>> = OnceLock::new();fn get_history() -> &'static Mutex<Vec<String>> { HISTORY.get_or_init(|| { let mut vec = Vec::with_capacity(20); for _ in 0..20 { vec.push(String::new()); } Mutex::new(vec) })
}
// Workaround for #10
static HISTORY: OnceLock<Mutex<Vec<String>>> = OnceLock::new();
fn get_history() -> &'static Mutex<Vec<String>> {
HISTORY.get_or_init(|| {
let mut vec = Vec::with_capacity(20);
for _ in 0..20 {
vec.push(String::new());
Mutex::new(vec)
})
if filter::filter(mes.clone(), tl.clone()) {
let mut history = get_history().lock().unwrap(); if filter::filter(mes.clone(), tl.clone()) && !history.contains(&mes.clone().id) { history.rotate_right(1); history[0] = mes.clone().id; info!("{:?}", history);
let mut history = get_history().lock().unwrap();
if filter::filter(mes.clone(), tl.clone()) && !history.contains(&mes.clone().id) {
history.rotate_right(1);
history[0] = mes.clone().id;
info!("{:?}", history);