small changes
This commit is contained in:
@@ -41,10 +41,10 @@ fn main() {
|
||||
let notif: Vec<Notification> = serde_json::from_str(payload_string.as_str()).unwrap();
|
||||
//println!("Just recieved: {:#?}", notif);
|
||||
for notification in notif{
|
||||
reference_arc.lock().unwrap().push_back(notification.clone());
|
||||
reference_arc.lock().unwrap().push_front(notification.clone());
|
||||
}
|
||||
while reference_arc.lock().unwrap().len() > 10{
|
||||
reference_arc.lock().unwrap().pop_front();
|
||||
while reference_arc.lock().unwrap().len() > 20{
|
||||
reference_arc.lock().unwrap().pop_back();
|
||||
|
||||
}
|
||||
println!("Current vec length: {}", reference_arc.lock() .unwrap().len());
|
||||
|
||||
Reference in New Issue
Block a user