Do not lock inner twice. Fixes bug in osx futures 0.1.1 update.

This commit is contained in:
mitchmindtree 2016-10-01 18:19:27 +10:00
parent 869af718a2
commit f71a95cd0e
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ impl Stream for SamplesStream {
let current_callback = match inner.current_callback.take() {
Some(c) => c,
None => {
self.inner.lock().unwrap().scheduled_task = Some(task::park());
inner.scheduled_task = Some(task::park());
return Ok(Async::NotReady);
}
};