Skip to content

Commit

Permalink
proto: Factor out return in handle
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage authored and djc committed Dec 23, 2024
1 parent b1e7709 commit f99ca19
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions quinn-proto/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Endpoint {
first_decode,
remaining,
};
match route_to {
return match route_to {
RouteDatagramTo::Incoming(incoming_idx) => {
let incoming_buffer = &mut self.incoming_buffers[incoming_idx];
let config = &self.server_config.as_ref().unwrap();
Expand All @@ -226,15 +226,13 @@ impl Endpoint {
self.all_incoming_buffers_total_bytes += datagram_len as u64;
}

return None;
}
RouteDatagramTo::Connection(ch) => {
return Some(DatagramEvent::ConnectionEvent(
ch,
ConnectionEvent(ConnectionEventInner::Datagram(event)),
))
None
}
}
RouteDatagramTo::Connection(ch) => Some(DatagramEvent::ConnectionEvent(
ch,
ConnectionEvent(ConnectionEventInner::Datagram(event)),
)),
};
}

//
Expand Down

0 comments on commit f99ca19

Please sign in to comment.