Better invalid encoding messages

This commit is contained in:
Tomasz Drwięga
2017-03-16 12:48:51 +01:00
parent b51d7e9f6a
commit 491eeb9878
18 changed files with 239 additions and 225 deletions

View File

@@ -190,7 +190,7 @@ impl From<EventLoop> for EventLoopHandle {
impl Drop for EventLoopHandle {
fn drop(&mut self) {
self.close.take().map(|v| v.complete(()));
self.close.take().map(|v| v.send(()));
}
}
@@ -203,7 +203,8 @@ impl EventLoopHandle {
/// Finishes this event loop.
pub fn close(mut self) {
self.close.take()
.expect("Close is taken only in `close` and `drop`. `close` is consuming; qed").complete(())
let _ = self.close.take()
.expect("Close is taken only in `close` and `drop`. `close` is consuming; qed")
.send(());
}
}