mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: handle_announce_request: remove two noop casts
This commit is contained in:
parent
5889cb22f7
commit
9797f24299
1 changed files with 3 additions and 3 deletions
|
|
@ -136,11 +136,11 @@ fn handle_announce_request<I: Ip>(
|
|||
peer_ip: I,
|
||||
peer_valid_until: ValidUntil,
|
||||
) -> AnnounceResponse<I> {
|
||||
let max_num_peers_to_take = if request.peers_wanted.0 <= 0 {
|
||||
config.protocol.max_response_peers as usize
|
||||
let max_num_peers_to_take: usize = if request.peers_wanted.0 <= 0 {
|
||||
config.protocol.max_response_peers
|
||||
} else {
|
||||
::std::cmp::min(
|
||||
config.protocol.max_response_peers as usize,
|
||||
config.protocol.max_response_peers,
|
||||
request.peers_wanted.0.try_into().unwrap(),
|
||||
)
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue