Skip to content

Commit

Permalink
format(all): Format code according to rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine committed Apr 14, 2019
1 parent 2c32e17 commit 52c7499
Show file tree
Hide file tree
Showing 14 changed files with 1,422 additions and 1,088 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions deconz-sp/src/call.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
use log::*;
use futures::{ Future, Poll, Async, try_ready };
use futures::sync::oneshot::Receiver;
use crate::protocol::IncomingMessage;
use crate::Error;
use futures::sync::oneshot::Receiver;
use futures::{try_ready, Async, Future, Poll};
use log::*;

pub struct Call {
receiver: Receiver<IncomingMessage>
receiver: Receiver<IncomingMessage>,
}

impl Call {
pub fn new(receiver: Receiver<IncomingMessage>) -> Self {
Call { receiver }
}
pub fn new(receiver: Receiver<IncomingMessage>) -> Self {
Call { receiver }
}
}

impl Future for Call {
type Item = IncomingMessage;
type Error = Error;
type Item = IncomingMessage;
type Error = Error;

fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
let msg = try_ready!(self.receiver.poll().map_err(|err| {
error!("Channel canceled: {}", err);
Error::Internal("Channel canceled")
}));
Ok(Async::Ready(msg))
}
}
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
let msg = try_ready!(self.receiver.poll().map_err(|err| {
error!("Channel canceled: {}", err);
Error::Internal("Channel canceled")
}));
Ok(Async::Ready(msg))
}
}
Loading

0 comments on commit 52c7499

Please sign in to comment.