Address some reviewing (#1246)

This commit is contained in:
Pierre Krieger
2019-09-20 10:46:13 +02:00
committed by GitHub
parent 170d2d268f
commit c7148d5ee5
3 changed files with 4 additions and 7 deletions

View File

@ -343,7 +343,8 @@ where TBehaviour: NetworkBehaviour<ProtocolsHandler = THandler>,
type Item = Result<TBehaviour::OutEvent, io::Error>;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
// We use a `this` variable to solve borrowing issues.
// We use a `this` variable because the compiler can't mutably borrow multiple times
// across a `Deref`.
let this = &mut *self;
loop {