uh huh
This commit is contained in:
parent
99d31fb28f
commit
7da4c6cea3
2 changed files with 4 additions and 21 deletions
|
@ -101,27 +101,16 @@ impl<E, T> SignalEmitter<E, T> {
|
|||
.expect("tried to re-emit signal during emission");
|
||||
handlers.append(self.just_connected.borrow_mut().as_mut());
|
||||
|
||||
if handlers.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut i = 0;
|
||||
let mut skip = 0;
|
||||
loop {
|
||||
if handlers[i + skip](emitter, f()) {
|
||||
// FIXME: does not preserve ordering
|
||||
while i < handlers.len() {
|
||||
if handlers[i](emitter, f()) {
|
||||
i += 1;
|
||||
} else {
|
||||
skip += 1;
|
||||
drop(handlers.swap_remove(i));
|
||||
}
|
||||
|
||||
if i + skip == handlers.len() {
|
||||
break;
|
||||
}
|
||||
|
||||
handlers.swap(i, i + skip);
|
||||
}
|
||||
|
||||
handlers.truncate(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -165,12 +165,6 @@ mod imp {
|
|||
false
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for Song {
|
||||
fn drop(&mut self) {
|
||||
println!("dropping AudreyUiPlayQueueSong");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
use crate::playbin::Song as PlaybinSong;
|
||||
|
|
Loading…
Reference in a new issue