Skip to content

Commit

Permalink
chore: minor cleanup of parse_request
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-melnychuk committed Mar 28, 2024
1 parent 3c7bf5b commit 23ca9fb
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions node/src/p2p/header_ex/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,7 @@ fn parse_request(request: HeaderRequest) -> Option<(u64, header_request::Data)>
return None;
}

let HeaderRequest {
amount,
data: Some(data),
} = request
else {
return None;
};

Some((amount, data))
request.data.map(|data| (request.amount, data))
}

#[cfg(test)]
Expand Down

0 comments on commit 23ca9fb

Please sign in to comment.