Use MAX associated const (#9196)

* Use MAX associated const
This commit is contained in:
Squirrel authored and GitHub committed 2021-06-24 11:53:49 +01:00
1 parent 09d9c2c9f6
commit ea1f21a904
56 files changed
+178 -178

No files matched your search

@@ -159,7 +159,7 @@ where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static,
}
let mut codec = UviBytes::default();
codec.set_max_len(usize::try_from(self.max_notification_size).unwrap_or(usize::max_value()));
codec.set_max_len(usize::try_from(self.max_notification_size).unwrap_or(usize::MAX));
let substream = NotificationsInSubstream {
socket: Framed::new(socket, codec),
@@ -390,7 +390,7 @@ where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static,
}
let mut codec = UviBytes::default();
codec.set_max_len(usize::try_from(self.max_notification_size).unwrap_or(usize::max_value()));
codec.set_max_len(usize::try_from(self.max_notification_size).unwrap_or(usize::MAX));
Ok(NotificationsOutOpen {
handshake,