Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
conradludgate committed Jun 17, 2024
1 parent 579f47e commit 49f3b7f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion postgres-protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ macro_rules! from_usize {
impl FromUsize for $t {
#[inline]
fn from_usize(x: usize) -> io::Result<$t> {
if x > <$t>::max_value() as usize {
if x > <$t>::MAX as usize {
Err(io::Error::new(
io::ErrorKind::InvalidInput,
"value too large to transmit",
Expand Down
2 changes: 1 addition & 1 deletion postgres-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ impl ToSql for IpAddr {
}

fn downcast(len: usize) -> Result<i32, Box<dyn Error + Sync + Send>> {
if len > i32::max_value() as usize {
if len > i32::MAX as usize {
Err("value too large to transmit".into())
} else {
Ok(len as i32)
Expand Down
1 change: 0 additions & 1 deletion postgres-types/src/special.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use bytes::BytesMut;
use postgres_protocol::types;
use std::error::Error;
use std::{i32, i64};

use crate::{FromSql, IsNull, ToSql, Type};

Expand Down

0 comments on commit 49f3b7f

Please sign in to comment.