Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2b5c8a

Browse files
authored
Merge pull request#1154 from cammeresi/master
Fix a few nits pointed out by clippy
2 parentsf9c2d5c +1f31219 commitc2b5c8a

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
@@ -60,7 +60,7 @@ macro_rules! from_usize {
6060
implFromUsizefor $t{
6161
#[inline]
6262
fn from_usize(x:usize) -> io::Result<$t>{
63-
if x > <$t>::max_value()asusize{
63+
if x > <$t>::MAXasusize{
6464
Err(io::Error::new(
6565
io::ErrorKind::InvalidInput,
6666
"value too large to transmit",

‎postgres-types/src/lib.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ impl ToSql for IpAddr {
12221222
}
12231223

12241224
fndowncast(len:usize) ->Result<i32,Box<dynError +Sync +Send>>{
1225-
if len > i32::max_value()asusize{
1225+
if len > i32::MAXasusize{
12261226
Err("value too large to transmit".into())
12271227
}else{
12281228
Ok(lenasi32)

‎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
usecrate::{FromSql,IsNull,ToSql,Type};
76

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp