Use async at places, use &self instead of self: &Self (#3594)

This commit is contained in:
Gurwinder Singh 2020-01-04 15:50:52 +05:30 committed by Ry Dahl
parent 70b1be6ff4
commit 9f6bab6010
14 changed files with 160 additions and 197 deletions

View file

@ -157,7 +157,7 @@ impl Worker {
///
/// This method blocks current thread.
pub fn post_message(
self: &Self,
&self,
buf: Buf,
) -> impl Future<Output = Result<(), ErrBox>> {
let channels = self.external_channels.lock().unwrap();
@ -170,7 +170,7 @@ impl Worker {
}
/// Get message from worker as a host.
pub fn get_message(self: &Self) -> WorkerReceiver {
pub fn get_message(&self) -> WorkerReceiver {
WorkerReceiver {
channels: self.external_channels.clone(),
}