Skip to content

Commit 9b9b3a5

Browse files
minor: bump clippy to 1.65 (#789)
1 parent f4b855b commit 9b9b3a5

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
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/configure-rust.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.64.0
9+
CLIPPY_VERSION=1.65.0
1010

1111
rustup install $CLIPPY_VERSION
1212

src/client/auth/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ pub(crate) fn generate_nonce_bytes() -> [u8; 32] {
512512

513513
pub(crate) fn generate_nonce() -> String {
514514
let result = generate_nonce_bytes();
515-
base64::encode(&result)
515+
base64::encode(result)
516516
}
517517

518518
fn mac<M: Mac + KeyInit>(

src/concern/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl WriteConcern {
329329
/// Whether the write concern was created with no values specified. If true, the write concern
330330
/// should be considered the server's default.
331331
pub(crate) fn is_empty(&self) -> bool {
332-
self.w == None && self.w_timeout == None && self.journal == None
332+
self.w.is_none() && self.w_timeout.is_none() && self.journal.is_none()
333333
}
334334

335335
/// Validates that the write concern. A write concern is invalid if both the `w` field is 0

src/test/spec/crud_v1/replace_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async fn run_replace_one_test(test_file: TestFile) {
8282

8383
assert_eq!(
8484
outcome.result.upserted_count.unwrap_or(0),
85-
if result.upserted_id.is_some() { 1 } else { 0 },
85+
u64::from(result.upserted_id.is_some()),
8686
"{}",
8787
test_case.description
8888
);

src/test/spec/crud_v1/update_many.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn run_update_many_test(test_file: TestFile) {
8383

8484
assert_eq!(
8585
outcome.result.upserted_count.unwrap_or(0),
86-
if result.upserted_id.is_some() { 1 } else { 0 },
86+
u64::from(result.upserted_id.is_some()),
8787
"{}",
8888
test_case.description
8989
);

src/test/spec/crud_v1/update_one.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async fn run_update_one_test(test_file: TestFile) {
8383

8484
assert_eq!(
8585
outcome.result.upserted_count.unwrap_or(0),
86-
if result.upserted_id.is_some() { 1 } else { 0 },
86+
u64::from(result.upserted_id.is_some()),
8787
"{}",
8888
test_case.description
8989
);

src/test/util/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,10 +480,7 @@ struct BuildInfo {
480480
}
481481

482482
pub(crate) fn get_default_name(description: &str) -> String {
483-
let mut db_name = description
484-
.replace('$', "%")
485-
.replace(' ', "_")
486-
.replace('.', "_");
483+
let mut db_name = description.replace('$', "%").replace([' ', '.'], "_");
487484
// database names must have fewer than 38 characters
488485
db_name.truncate(37);
489486
db_name

0 commit comments

Comments
 (0)