Skip to content

Commit 6cdffa5

Browse files
minor: bump clippy version to 1.71.0 (#921)
1 parent 76cf349 commit 6cdffa5

File tree

6 files changed

+20
-21
lines changed

6 files changed

+20
-21
lines changed

.evergreen/check-clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ source ./.evergreen/env.sh
66
source ./.evergreen/feature-combinations.sh
77

88
# Pin clippy to the latest version. This should be updated when new versions of Rust are released.
9-
CLIPPY_VERSION=1.67.0
9+
CLIPPY_VERSION=1.71.0
1010

1111
rustup install $CLIPPY_VERSION
1212

src/client/options.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,7 @@ impl ConnectionString {
16791679

16801680
// Set username and password.
16811681
if let Some(u) = username {
1682-
let mut credential = conn_str.credential.get_or_insert_with(Default::default);
1682+
let credential = conn_str.credential.get_or_insert_with(Default::default);
16831683
validate_userinfo(u, "username")?;
16841684
let decoded_u = percent_decode(u, "username must be URL encoded")?;
16851685

@@ -1701,7 +1701,7 @@ impl ConnectionString {
17011701

17021702
match parts.auth_mechanism {
17031703
Some(ref mechanism) => {
1704-
let mut credential = conn_str.credential.get_or_insert_with(Default::default);
1704+
let credential = conn_str.credential.get_or_insert_with(Default::default);
17051705
credential.source = parts.auth_source;
17061706

17071707
if let Some(mut doc) = parts.auth_mechanism_properties.take() {
@@ -1989,7 +1989,7 @@ impl ConnectionString {
19891989
self.heartbeat_frequency = Some(Duration::from_millis(get_duration!(value, k)));
19901990
}
19911991
k @ "journal" => {
1992-
let mut write_concern = self.write_concern.get_or_insert_with(Default::default);
1992+
let write_concern = self.write_concern.get_or_insert_with(Default::default);
19931993
write_concern.journal = Some(get_bool!(value, k));
19941994
}
19951995
k @ "loadbalanced" => {
@@ -2216,7 +2216,7 @@ impl ConnectionString {
22162216
}
22172217
},
22182218
"w" => {
2219-
let mut write_concern = self.write_concern.get_or_insert_with(Default::default);
2219+
let write_concern = self.write_concern.get_or_insert_with(Default::default);
22202220

22212221
match value.parse::<i32>() {
22222222
Ok(w) => match u32::try_from(w) {

src/sdam/description/topology/test/sdam.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{borrow::Borrow, collections::HashMap, sync::Arc, time::Duration};
1+
use std::{collections::HashMap, sync::Arc, time::Duration};
22

33
use bson::Document;
44
use serde::Deserialize;
@@ -807,7 +807,6 @@ async fn pool_cleared_error_does_not_mark_unknown() {
807807
assert_eq!(
808808
topology
809809
.watch()
810-
.borrow()
811810
.server_description(&address)
812811
.unwrap()
813812
.server_type,

src/test/spec/connection_stepdown.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ async fn run_test<F: Future>(
7070
test(client, db, coll).await;
7171
}
7272

73-
#[function_name::named]
7473
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
7574
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
7675
async fn get_more() {
@@ -116,10 +115,9 @@ async fn get_more() {
116115
assert_eq!(client.count_pool_cleared_events(), 0);
117116
}
118117

119-
run_test(function_name!(), get_more_test).await;
118+
run_test("get_more", get_more_test).await;
120119
}
121120

122-
#[function_name::named]
123121
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
124122
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
125123
async fn notwritableprimary_keep_pool() {
@@ -167,7 +165,11 @@ async fn notwritableprimary_keep_pool() {
167165
assert_eq!(client.count_pool_cleared_events(), 0);
168166
}
169167

170-
run_test(function_name!(), notwritableprimary_keep_pool_test).await;
168+
run_test(
169+
"notwritableprimary_keep_pool",
170+
notwritableprimary_keep_pool_test,
171+
)
172+
.await;
171173
}
172174

173175
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
@@ -226,7 +228,6 @@ async fn notwritableprimary_reset_pool() {
226228
.await;
227229
}
228230

229-
#[function_name::named]
230231
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
231232
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
232233
async fn shutdown_in_progress() {
@@ -273,10 +274,9 @@ async fn shutdown_in_progress() {
273274
.expect("insert should have succeeded");
274275
}
275276

276-
run_test(function_name!(), shutdown_in_progress_test).await;
277+
run_test("shutdown_in_progress", shutdown_in_progress_test).await;
277278
}
278279

279-
#[function_name::named]
280280
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
281281
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
282282
async fn interrupted_at_shutdown() {
@@ -325,5 +325,5 @@ async fn interrupted_at_shutdown() {
325325
runtime::delay_for(Duration::from_millis(250)).await;
326326
}
327327

328-
run_test(function_name!(), interrupted_at_shutdown_test).await;
328+
run_test("interrupted_at_shutdown", interrupted_at_shutdown_test).await;
329329
}

src/test/spec/transactions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async fn deserialize_recovery_token() {
107107
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
108108
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
109109
async fn convenient_api_custom_error() {
110-
let _guard: _ = LOCK.run_concurrently().await;
110+
let _guard = LOCK.run_concurrently().await;
111111
let client = Client::test_builder().event_client().build().await;
112112
if !client.supports_transactions() {
113113
log_uncaptured("Skipping convenient_api_custom_error: no transaction support.");
@@ -143,7 +143,7 @@ async fn convenient_api_custom_error() {
143143
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
144144
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
145145
async fn convenient_api_returned_value() {
146-
let _guard: _ = LOCK.run_concurrently().await;
146+
let _guard = LOCK.run_concurrently().await;
147147
let client = Client::test_builder().event_client().build().await;
148148
if !client.supports_transactions() {
149149
log_uncaptured("Skipping convenient_api_returned_value: no transaction support.");
@@ -175,7 +175,7 @@ async fn convenient_api_returned_value() {
175175
#[cfg_attr(feature = "tokio-runtime", tokio::test)]
176176
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
177177
async fn convenient_api_retry_timeout_callback() {
178-
let _guard: _ = LOCK.run_concurrently().await;
178+
let _guard = LOCK.run_concurrently().await;
179179
let client = Client::test_builder().event_client().build().await;
180180
if !client.supports_transactions() {
181181
log_uncaptured("Skipping convenient_api_retry_timeout_callback: no transaction support.");
@@ -211,7 +211,7 @@ async fn convenient_api_retry_timeout_callback() {
211211
#[cfg_attr(feature = "tokio-runtime", tokio::test(flavor = "multi_thread"))]
212212
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
213213
async fn convenient_api_retry_timeout_commit_unknown() {
214-
let _guard: _ = LOCK.run_exclusively().await;
214+
let _guard = LOCK.run_exclusively().await;
215215
let mut options = CLIENT_OPTIONS.get().await.clone();
216216
if Client::test_builder().build().await.is_sharded() {
217217
options.direct_connection = Some(true);
@@ -267,7 +267,7 @@ async fn convenient_api_retry_timeout_commit_unknown() {
267267
#[cfg_attr(feature = "tokio-runtime", tokio::test(flavor = "multi_thread"))]
268268
#[cfg_attr(feature = "async-std-runtime", async_std::test)]
269269
async fn convenient_api_retry_timeout_commit_transient() {
270-
let _guard: _ = LOCK.run_exclusively().await;
270+
let _guard = LOCK.run_exclusively().await;
271271
let mut options = CLIENT_OPTIONS.get().await.clone();
272272
if Client::test_builder().build().await.is_sharded() {
273273
options.direct_connection = Some(true);

src/test/spec/unified_runner/operation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2147,7 +2147,7 @@ impl TestOperation for Close {
21472147
let target_entity = entities.get(id).unwrap();
21482148
match target_entity {
21492149
Entity::Client(_) => {
2150-
let mut client = entities.get_mut(id).unwrap().as_mut_client();
2150+
let client = entities.get_mut(id).unwrap().as_mut_client();
21512151
let closed_client_topology_id = client.topology_id;
21522152
client.client = None;
21532153

0 commit comments

Comments
 (0)