Skip to content

Commit 50a1368

Browse files
minor: bump clippy to 1.90 (#1480)
1 parent fa46ded commit 50a1368

37 files changed

+126
-122
lines changed

.evergreen/check-clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o errexit
55
source ./.evergreen/env.sh
66

77
# Pin clippy to the latest version. This should be updated when new versions of Rust are released.
8-
CLIPPY_VERSION=1.88.0
8+
CLIPPY_VERSION=1.90.0
99

1010
rustup install $CLIPPY_VERSION
1111

src/action/aggregate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Database {
3939
/// called, the returned cursor will be generic over the `T` specified.
4040
#[deeplink]
4141
#[options_doc(aggregate)]
42-
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate {
42+
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate<'_> {
4343
Aggregate::new(
4444
AggregateTargetRef::Database(self),
4545
pipeline.into_iter().collect(),
@@ -61,7 +61,7 @@ where
6161
/// called, the returned cursor will be generic over the `T` specified.
6262
#[deeplink]
6363
#[options_doc(aggregate)]
64-
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate {
64+
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate<'_> {
6565
Aggregate::new(
6666
AggregateTargetRef::Collection(CollRef::new(self)),
6767
pipeline.into_iter().collect(),
@@ -82,7 +82,7 @@ impl crate::sync::Database {
8282
/// returned cursor will be generic over the `T` specified.
8383
#[deeplink]
8484
#[options_doc(aggregate, "run")]
85-
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate {
85+
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate<'_> {
8686
self.async_database.aggregate(pipeline)
8787
}
8888
}
@@ -103,7 +103,7 @@ where
103103
/// returned cursor will be generic over the `T` specified.
104104
#[deeplink]
105105
#[options_doc(aggregate, "run")]
106-
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate {
106+
pub fn aggregate(&self, pipeline: impl IntoIterator<Item = Document>) -> Aggregate<'_> {
107107
self.async_collection.aggregate(pipeline)
108108
}
109109
}

src/action/bulk_write.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Client {
3030
pub fn bulk_write(
3131
&self,
3232
models: impl IntoIterator<Item = impl Into<WriteModel>>,
33-
) -> BulkWrite<SummaryBulkWriteResult> {
33+
) -> BulkWrite<'_, SummaryBulkWriteResult> {
3434
let mut models_vec = Vec::new();
3535
for model in models.into_iter() {
3636
models_vec.push(model.into());
@@ -58,7 +58,7 @@ impl crate::sync::Client {
5858
pub fn bulk_write(
5959
&self,
6060
models: impl IntoIterator<Item = impl Into<WriteModel>>,
61-
) -> BulkWrite<SummaryBulkWriteResult> {
61+
) -> BulkWrite<'_, SummaryBulkWriteResult> {
6262
self.async_client.bulk_write(models)
6363
}
6464
}

src/action/count.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ where
3232
/// `await` will return d[`Result<u64>`].
3333
#[deeplink]
3434
#[options_doc(estimated_doc_count)]
35-
pub fn estimated_document_count(&self) -> EstimatedDocumentCount {
35+
pub fn estimated_document_count(&self) -> EstimatedDocumentCount<'_> {
3636
EstimatedDocumentCount {
3737
cr: CollRef::new(self),
3838
options: None,
@@ -49,7 +49,7 @@ where
4949
/// `await` will return d[`Result<u64>`].
5050
#[deeplink]
5151
#[options_doc(count_docs)]
52-
pub fn count_documents(&self, filter: Document) -> CountDocuments {
52+
pub fn count_documents(&self, filter: Document) -> CountDocuments<'_> {
5353
CountDocuments {
5454
cr: CollRef::new(self),
5555
filter,
@@ -79,7 +79,7 @@ where
7979
/// [`run`](EstimatedDocumentCount::run) will return d[`Result<u64>`].
8080
#[deeplink]
8181
#[options_doc(estimated_doc_count, "run")]
82-
pub fn estimated_document_count(&self) -> EstimatedDocumentCount {
82+
pub fn estimated_document_count(&self) -> EstimatedDocumentCount<'_> {
8383
self.async_collection.estimated_document_count()
8484
}
8585

@@ -90,7 +90,7 @@ where
9090
/// [`run`](CountDocuments::run) will return d[`Result<u64>`].
9191
#[deeplink]
9292
#[options_doc(count_docs, "run")]
93-
pub fn count_documents(&self, filter: Document) -> CountDocuments {
93+
pub fn count_documents(&self, filter: Document) -> CountDocuments<'_> {
9494
self.async_collection.count_documents(filter)
9595
}
9696
}

src/action/create_collection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl Database {
2828
/// `await` will return d[`Result<()>`].
2929
#[deeplink]
3030
#[options_doc(create_coll)]
31-
pub fn create_collection(&self, name: impl Into<String>) -> CreateCollection {
31+
pub fn create_collection(&self, name: impl Into<String>) -> CreateCollection<'_> {
3232
CreateCollection {
3333
db: self,
3434
name: name.into(),
@@ -48,7 +48,7 @@ impl crate::sync::Database {
4848
/// [`run`](CreateCollection::run) will return d[`Result<()>`].
4949
#[deeplink]
5050
#[options_doc(create_coll, "run")]
51-
pub fn create_collection(&self, name: impl Into<String>) -> CreateCollection {
51+
pub fn create_collection(&self, name: impl Into<String>) -> CreateCollection<'_> {
5252
self.async_database.create_collection(name)
5353
}
5454
}

src/action/create_index.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ where
3333
/// `await` will return d[`Result<CreateIndexResult>`].
3434
#[deeplink]
3535
#[options_doc(create_index)]
36-
pub fn create_index(&self, index: IndexModel) -> CreateIndex {
36+
pub fn create_index(&self, index: IndexModel) -> CreateIndex<'_> {
3737
CreateIndex {
3838
coll: CollRef::new(self),
3939
indexes: vec![index],
@@ -72,7 +72,7 @@ where
7272
/// [`run`](CreateIndex::run) will return d[`Result<CreateIndexResult>`].
7373
#[deeplink]
7474
#[options_doc(create_index, "run")]
75-
pub fn create_index(&self, index: IndexModel) -> CreateIndex {
75+
pub fn create_index(&self, index: IndexModel) -> CreateIndex<'_> {
7676
self.async_collection.create_index(index)
7777
}
7878

src/action/csfle/create_data_key.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl ClientEncryption {
1212
/// document as a UUID.
1313
#[deeplink]
1414
#[options_doc(create_data_keys)]
15-
pub fn create_data_key(&self, master_key: impl Into<MasterKey>) -> CreateDataKey {
15+
pub fn create_data_key(&self, master_key: impl Into<MasterKey>) -> CreateDataKey<'_> {
1616
CreateDataKey {
1717
client_enc: self,
1818
master_key: master_key.into(),

src/action/csfle/encrypt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl ClientEncryption {
2525
value: impl Into<crate::bson::RawBson>,
2626
key: impl Into<EncryptKey>,
2727
algorithm: Algorithm,
28-
) -> Encrypt {
28+
) -> Encrypt<'_> {
2929
Encrypt {
3030
client_enc: self,
3131
mode: Value {

src/action/delete.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where
2727
/// `await` will return d[`Result<DeleteResult>`].
2828
#[deeplink]
2929
#[options_doc(delete)]
30-
pub fn delete_one(&self, query: Document) -> Delete {
30+
pub fn delete_one(&self, query: Document) -> Delete<'_> {
3131
Delete {
3232
coll: CollRef::new(self),
3333
query,
@@ -42,7 +42,7 @@ where
4242
/// `await` will return d[`Result<DeleteResult>`].
4343
#[deeplink]
4444
#[options_doc(delete)]
45-
pub fn delete_many(&self, query: Document) -> Delete {
45+
pub fn delete_many(&self, query: Document) -> Delete<'_> {
4646
Delete {
4747
coll: CollRef::new(self),
4848
query,
@@ -68,7 +68,7 @@ where
6868
/// [`run`](Delete::run) will return d[`Result<DeleteResult>`].
6969
#[deeplink]
7070
#[options_doc(delete, "run")]
71-
pub fn delete_one(&self, query: Document) -> Delete {
71+
pub fn delete_one(&self, query: Document) -> Delete<'_> {
7272
self.async_collection.delete_one(query)
7373
}
7474

@@ -77,7 +77,7 @@ where
7777
/// [`run`](Delete::run) will return d[`Result<DeleteResult>`].
7878
#[deeplink]
7979
#[options_doc(delete, "run")]
80-
pub fn delete_many(&self, query: Document) -> Delete {
80+
pub fn delete_many(&self, query: Document) -> Delete<'_> {
8181
self.async_collection.delete_many(query)
8282
}
8383
}

src/action/distinct.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where
2424
/// `await` will return d[`Result<Vec<Bson>>`].
2525
#[deeplink]
2626
#[options_doc(distinct)]
27-
pub fn distinct(&self, field_name: impl AsRef<str>, filter: Document) -> Distinct {
27+
pub fn distinct(&self, field_name: impl AsRef<str>, filter: Document) -> Distinct<'_> {
2828
Distinct {
2929
coll: CollRef::new(self),
3030
field_name: field_name.as_ref().to_string(),
@@ -45,7 +45,7 @@ where
4545
/// [`run`](Distinct::run) will return d[`Result<Vec<Bson>>`].
4646
#[deeplink]
4747
#[options_doc(distinct, "run")]
48-
pub fn distinct(&self, field_name: impl AsRef<str>, filter: Document) -> Distinct {
48+
pub fn distinct(&self, field_name: impl AsRef<str>, filter: Document) -> Distinct<'_> {
4949
self.async_collection.distinct(field_name, filter)
5050
}
5151
}

0 commit comments

Comments
 (0)