Skip to content

Commit

Permalink
appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
squell authored and davidv1992 committed Sep 18, 2024
1 parent 997fe0b commit e7069b8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rustls/src/msgs/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,15 @@ pub enum ClientPuzzle {
impl Codec<'_> for ClientPuzzle {
fn encode(&self, bytes: &mut Vec<u8>) {
match self {
ClientPuzzle::SupportIndication(supported) => {
Self::SupportIndication(supported) => {
supported.encode(bytes);
PayloadU16::empty().encode(bytes);
}
ClientPuzzle::Cookie(cookie) => {
Self::Cookie(cookie) => {
vec![ClientPuzzleType::COOKIE].encode(bytes);
cookie.encode(bytes);
}
ClientPuzzle::Unknown(puzzletype, data) => {
Self::Unknown(puzzletype, data) => {
vec![*puzzletype].encode(bytes);
data.encode(bytes);
}
Expand Down Expand Up @@ -623,10 +623,10 @@ impl ClientPuzzleChallenge {

pub fn solve(&self) -> Option<ClientPuzzle> {
match self {
ClientPuzzleChallenge::Cookie(challenge) => {
Self::Cookie(challenge) => {
Some(ClientPuzzle::Cookie(challenge.clone()))
}
ClientPuzzleChallenge::Unknown(_, _) => None,
Self::Unknown(_, _) => None,
}
}
}
Expand Down

0 comments on commit e7069b8

Please sign in to comment.