fn cleanup(listeners: &mut Vec<Box<dyn Listener<M>>>) {
        let mut i = 0;
        while i < listeners.len() {
            if listeners[i].alive() {
                i += 1;
            } else {
                listeners.swap_remove(i);
            }
        }
    }
/// Discard all dead weak pointers in `listeners`.
Discard all dead weak pointers in `listeners`.
Discard all dead weak pointers in ` listeners ` .
fn cleanup(listeners: &mut Vec<Box<dyn Listener<M>>>) {
        let mut i = 0;
        while i < listeners.len() {
            if listeners[i].alive() {
                i += 1;
            } else {
                listeners.swap_remove(i);
            }
        }
    }
fn cleanup ( listeners : & mut Vec < Box < dyn Listener < M > > > ) { let mut i = 0 ; while i < listeners . len ( ) { if listeners [ i ] . alive ( ) { i += 1 ; } else { listeners . swap_remove ( i ) ; } } }
Discard all dead weak pointers in `listeners`.
Discard all dead weak pointers in ` listeners ` .
listeners
&mut Vec<Box<dyn Listener<M>>>