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

Commit24d3234

Browse files
committed
Fix clippy needless_lifetimes
1 parentd7ccc7e commit24d3234

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

‎postgres-protocol/src/message/backend.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub struct ColumnFormats<'a> {
475475
remaining:u16,
476476
}
477477

478-
impl<'a>FallibleIteratorforColumnFormats<'a>{
478+
implFallibleIteratorforColumnFormats<'_>{
479479
typeItem =u16;
480480
typeError = io::Error;
481481

@@ -557,7 +557,7 @@ pub struct DataRowRanges<'a> {
557557
remaining:u16,
558558
}
559559

560-
impl<'a>FallibleIteratorforDataRowRanges<'a>{
560+
implFallibleIteratorforDataRowRanges<'_>{
561561
typeItem =Option<Range<usize>>;
562562
typeError = io::Error;
563563

@@ -645,7 +645,7 @@ pub struct ErrorField<'a> {
645645
value:&'a[u8],
646646
}
647647

648-
impl<'a>ErrorField<'a>{
648+
implErrorField<'_>{
649649
#[inline]
650650
pubfntype_(&self) ->u8{
651651
self.type_
@@ -717,7 +717,7 @@ pub struct Parameters<'a> {
717717
remaining:u16,
718718
}
719719

720-
impl<'a>FallibleIteratorforParameters<'a>{
720+
implFallibleIteratorforParameters<'_>{
721721
typeItem =Oid;
722722
typeError = io::Error;
723723

‎postgres-protocol/src/types/mod.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ impl<'a> Array<'a> {
582582
/// An iterator over the dimensions of an array.
583583
pubstructArrayDimensions<'a>(&'a[u8]);
584584

585-
impl<'a>FallibleIteratorforArrayDimensions<'a>{
585+
implFallibleIteratorforArrayDimensions<'_>{
586586
typeItem =ArrayDimension;
587587
typeError =StdBox<dynError +Sync +Send>;
588588

@@ -950,7 +950,7 @@ pub struct PathPoints<'a> {
950950
buf:&'a[u8],
951951
}
952952

953-
impl<'a>FallibleIteratorforPathPoints<'a>{
953+
implFallibleIteratorforPathPoints<'_>{
954954
typeItem =Point;
955955
typeError =StdBox<dynError +Sync +Send>;
956956

‎postgres-types/src/lib.rs‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ pub enum Format {
914914
Binary,
915915
}
916916

917-
impl<'a,T>ToSqlfor&'aT
917+
impl<T>ToSqlfor&T
918918
where
919919
T:ToSql,
920920
{
@@ -963,7 +963,7 @@ impl<T: ToSql> ToSql for Option<T> {
963963
to_sql_checked!();
964964
}
965965

966-
impl<'a,T:ToSql>ToSqlfor&'a[T]{
966+
impl<T:ToSql>ToSqlfor&[T]{
967967
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
968968
let member_type =match*ty.kind(){
969969
Kind::Array(ref member) => member,
@@ -1004,7 +1004,7 @@ impl<'a, T: ToSql> ToSql for &'a [T] {
10041004
to_sql_checked!();
10051005
}
10061006

1007-
impl<'a>ToSqlfor&'a[u8]{
1007+
implToSqlfor&[u8]{
10081008
fnto_sql(&self, _:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
10091009
types::bytea_to_sql(self, w);
10101010
Ok(IsNull::No)
@@ -1064,7 +1064,7 @@ impl<T: ToSql> ToSql for Box<[T]> {
10641064
to_sql_checked!();
10651065
}
10661066

1067-
impl<'a>ToSqlforCow<'a,[u8]>{
1067+
implToSqlforCow<'_,[u8]>{
10681068
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
10691069
<&[u8]asToSql>::to_sql(&self.as_ref(), ty, w)
10701070
}
@@ -1088,7 +1088,7 @@ impl ToSql for Vec<u8> {
10881088
to_sql_checked!();
10891089
}
10901090

1091-
impl<'a>ToSqlfor&'astr{
1091+
implToSqlfor&str{
10921092
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
10931093
match ty.name(){
10941094
"ltree" => types::ltree_to_sql(self, w),
@@ -1109,7 +1109,7 @@ impl<'a> ToSql for &'a str {
11091109
to_sql_checked!();
11101110
}
11111111

1112-
impl<'a>ToSqlforCow<'a,str>{
1112+
implToSqlforCow<'_,str>{
11131113
fnto_sql(&self,ty:&Type,w:&mutBytesMut) ->Result<IsNull,Box<dynError +Sync +Send>>{
11141114
<&strasToSql>::to_sql(&self.as_ref(), ty, w)
11151115
}
@@ -1256,17 +1256,17 @@ impl BorrowToSql for &dyn ToSql {
12561256
}
12571257
}
12581258

1259-
impl<'a> sealed::SealedforBox<dynToSql +Sync +'a>{}
1259+
impl sealed::SealedforBox<dynToSql +Sync +'_>{}
12601260

1261-
impl<'a>BorrowToSqlforBox<dynToSql +Sync +'a>{
1261+
implBorrowToSqlforBox<dynToSql +Sync +'_>{
12621262
#[inline]
12631263
fnborrow_to_sql(&self) ->&dynToSql{
12641264
self.as_ref()
12651265
}
12661266
}
12671267

1268-
impl<'a> sealed::SealedforBox<dynToSql +Sync +Send +'a>{}
1269-
impl<'a>BorrowToSqlforBox<dynToSql +Sync +Send +'a>{
1268+
impl sealed::SealedforBox<dynToSql +Sync +Send +'_>{}
1269+
implBorrowToSqlforBox<dynToSql +Sync +Send +'_>{
12701270
#[inline]
12711271
fnborrow_to_sql(&self) ->&dynToSql{
12721272
self.as_ref()

‎postgres/src/notifications.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct Iter<'a> {
7777
connection:ConnectionRef<'a>,
7878
}
7979

80-
impl<'a>FallibleIteratorforIter<'a>{
80+
implFallibleIteratorforIter<'_>{
8181
typeItem =Notification;
8282
typeError =Error;
8383

@@ -100,7 +100,7 @@ pub struct BlockingIter<'a> {
100100
connection:ConnectionRef<'a>,
101101
}
102102

103-
impl<'a>FallibleIteratorforBlockingIter<'a>{
103+
implFallibleIteratorforBlockingIter<'_>{
104104
typeItem =Notification;
105105
typeError =Error;
106106

@@ -129,7 +129,7 @@ pub struct TimeoutIter<'a> {
129129
timeout:Duration,
130130
}
131131

132-
impl<'a>FallibleIteratorforTimeoutIter<'a>{
132+
implFallibleIteratorforTimeoutIter<'_>{
133133
typeItem =Notification;
134134
typeError =Error;
135135

‎postgres/src/transaction.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct Transaction<'a> {
1212
transaction:Option<tokio_postgres::Transaction<'a>>,
1313
}
1414

15-
impl<'a>DropforTransaction<'a>{
15+
implDropforTransaction<'_>{
1616
fndrop(&mutself){
1717
ifletSome(transaction) =self.transaction.take(){
1818
let _ =self.connection.block_on(transaction.rollback());

‎tokio-postgres/src/query.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::task::{Context, Poll};
2020

2121
structBorrowToSqlParamsDebug<'a,T>(&'a[T]);
2222

23-
impl<'a,T> fmt::DebugforBorrowToSqlParamsDebug<'a,T>
23+
impl<T> fmt::DebugforBorrowToSqlParamsDebug<'_,T>
2424
where
2525
T:BorrowToSql,
2626
{

‎tokio-postgres/src/row.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ impl RowIndex for str {
7979
}
8080
}
8181

82-
impl<'a,T>Sealedfor&'aTwhereT: ?Sized +Sealed{}
82+
impl<T>Sealedfor&TwhereT: ?Sized +Sealed{}
8383

84-
impl<'a,T>RowIndexfor&'aT
84+
impl<T>RowIndexfor&T
8585
where
8686
T: ?Sized +RowIndex,
8787
{

‎tokio-postgres/src/to_statement.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod private {
1111
Query(&'astr),
1212
}
1313

14-
impl<'a>ToStatementType<'a>{
14+
implToStatementType<'_>{
1515
pubasyncfninto_statement(self,client:&Client) ->Result<Statement,Error>{
1616
matchself{
1717
ToStatementType::Statement(s) =>Ok(s.clone()),

‎tokio-postgres/src/transaction.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct Savepoint {
3333
depth:u32,
3434
}
3535

36-
impl<'a>DropforTransaction<'a>{
36+
implDropforTransaction<'_>{
3737
fndrop(&mutself){
3838
ifself.done{
3939
return;

‎tokio-postgres/src/transaction_builder.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl<'a> TransactionBuilder<'a> {
113113
done:bool,
114114
}
115115

116-
impl<'a>DropforRollbackIfNotDone<'a>{
116+
implDropforRollbackIfNotDone<'_>{
117117
fndrop(&mutself){
118118
ifself.done{
119119
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp