mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
fix(core): use cmp::max instead of infix max
This commit is contained in:
parent
eddd873f4d
commit
3df0743bdf
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user