improve style
This commit is contained in:
parent
0b7210d597
commit
f4007511ea
7 changed files with 37 additions and 108 deletions
|
|
@ -31,7 +31,7 @@ impl<S: AsyncWrite> ComponentAuth<S> {
|
|||
stream,
|
||||
Handshake::from_password_and_stream_id(&password, &sid)
|
||||
);
|
||||
return Ok(this);
|
||||
Ok(this)
|
||||
}
|
||||
|
||||
fn send(&mut self, stream: XMPPStream<S>, handshake: Handshake) {
|
||||
|
|
@ -61,7 +61,7 @@ impl<S: AsyncRead + AsyncWrite> Future for ComponentAuth<S> {
|
|||
Ok(Async::NotReady)
|
||||
},
|
||||
Err(e) =>
|
||||
Err(e.into()),
|
||||
Err(e)?
|
||||
},
|
||||
ComponentAuthState::WaitRecv(mut stream) =>
|
||||
match stream.poll() {
|
||||
|
|
@ -85,7 +85,7 @@ impl<S: AsyncRead + AsyncWrite> Future for ComponentAuth<S> {
|
|||
Ok(Async::NotReady)
|
||||
},
|
||||
Err(e) =>
|
||||
Err(e.into()),
|
||||
Err(e)?
|
||||
},
|
||||
ComponentAuthState::Invalid =>
|
||||
unreachable!(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue