msg_socket: AsyncReceiver doesn't need a mut ref

The AsyncReceiver doesn't need to modify the message receiver so let it
take a plain old borrow.

Change-Id: I07e93d2ed12327dd893fec654d2bdd613a848fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2167694
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
Dylan Reid 2020-04-26 07:12:54 +00:00 committed by Commit Bot
parent 4080f8b2d3
commit a7237949da

View file

@ -50,7 +50,7 @@ impl<I: MsgOnSocket, O: MsgOnSocket> MsgSocket<I, O> {
}
// Creates an async receiver that implements `futures::Stream`.
pub fn async_receiver(&mut self) -> MsgResult<AsyncReceiver<I, O>> {
pub fn async_receiver(&self) -> MsgResult<AsyncReceiver<I, O>> {
AsyncReceiver::new(self)
}
}