Skip to content

Commit 48478a4

Browse files
committed
ci: fix clippy lints
1 parent 84502bc commit 48478a4

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

postgres-protocol/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ macro_rules! from_usize {
6868
impl FromUsize for $t {
6969
#[inline]
7070
fn from_usize(x: usize) -> io::Result<$t> {
71-
if x > <$t>::max_value() as usize {
71+
if x > <$t>::MAX as usize {
7272
Err(io::Error::new(
7373
io::ErrorKind::InvalidInput,
7474
"value too large to transmit",

postgres-types/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ impl ToSql for IpAddr {
11721172
}
11731173

11741174
fn downcast(len: usize) -> Result<i32, Box<dyn Error + Sync + Send>> {
1175-
if len > i32::max_value() as usize {
1175+
if len > i32::MAX as usize {
11761176
Err("value too large to transmit".into())
11771177
} else {
11781178
Ok(len as i32)

postgres-types/src/special.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use bytes::BytesMut;
22
use postgres_protocol::types;
33
use std::error::Error;
4-
use std::{i32, i64};
54

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

0 commit comments

Comments
 (0)