Skip to content

Commit

Permalink
chore(node): minor cleanup of parse_request (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergey-melnychuk authored Mar 28, 2024
1 parent 3c7bf5b commit 19783c4
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 19783c4

Please sign in to comment.