Skip to content

Commit

Permalink
H3: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stammw committed May 4, 2020
1 parent c639189 commit 3d26a15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions quinn-h3/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -534,11 +534,8 @@ where
///
/// The peer will receive a request error with `REQUEST_CANCELLED` code.
pub fn cancel(&mut self) {
match self.state {
SendRequestState::Sending(ref mut send) => {
send.cancel();
}
_ => (),
if let SendRequestState::Sending(ref mut send) = self.state {
send.cancel();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion quinn-h3/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ impl RecvData {

pub fn reset(&mut self, err_code: ErrorCode) {
if let Some(ref mut r) = self.recv {
r.reset(err_code.into());
r.reset(err_code);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion quinn-h3/src/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl SendHeaders {
}

pub fn reset(&mut self, err_code: ErrorCode) {
self.0.reset(err_code.into());
self.0.reset(err_code);
}
}

Expand Down

0 comments on commit 3d26a15

Please sign in to comment.