fix(core): use cmp::max instead of infix max

This commit is contained in:
Ryan Leckey 2021-02-22 23:02:44 -08:00
parent eddd873f4d
commit 3df0743bdf
No known key found for this signature in database
GPG Key ID: F8AA68C235AB08C9

View File

@ -1,4 +1,5 @@
use std::marker::PhantomData;
use std::cmp;
use std::ops::{Deref, DerefMut};
use bytes::{Bytes, BytesMut};
@ -77,7 +78,7 @@ macro_rules! read {
// while our read buffer is too small to satisfy the requested amount
while $self.rbuf.len() < ($offset + $n) {
// ensure that there is room in the read buffer
$self.rbuf.reserve($n.max(128));
$self.rbuf.reserve(cmp::max($n, 128));
#[allow(unsafe_code)]
unsafe {