Skip to content

Commit 0ee2619

Browse files
RUST-1357 Bump clippy version to 1.61.0 (#681)
1 parent bd54750 commit 0ee2619

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.evergreen/check-clippy.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
set -o errexit
44

55
source ./.evergreen/configure-rust.sh
6-
# Pin clippy to the lastest version. This should be updated when new versions of Rust are released.
7-
rustup default 1.59.0
8-
96
source ./.evergreen/feature-combinations.sh
107

8+
# Pin clippy to the latest version. This should be updated when new versions of Rust are released.
9+
CLIPPY_VERSION=1.61.0
10+
11+
rustup install $CLIPPY_VERSION
12+
1113
for ((i = 0; i < ${#FEATURE_COMBINATIONS[@]}; i++)); do
12-
cargo clippy --all-targets ${FEATURE_COMBINATIONS[$i]} -p mongodb -- -D warnings
14+
cargo +$CLIPPY_VERSION clippy --all-targets ${FEATURE_COMBINATIONS[$i]} -p mongodb -- -D warnings
1315
done

src/client/session/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl ClientSession {
382382
if let Some(defaults) = self.default_transaction_options() {
383383
merge_options!(
384384
defaults,
385-
&mut options,
385+
options,
386386
[
387387
read_concern,
388388
write_concern,

src/cmap/conn/wire/header.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ impl Header {
4141

4242
/// Serializes the Header and writes the bytes to `w`.
4343
pub(crate) async fn write_to<W: AsyncWrite + Unpin>(&self, stream: &mut W) -> Result<()> {
44-
stream.write(&self.length.to_le_bytes()).await?;
45-
stream.write(&self.request_id.to_le_bytes()).await?;
46-
stream.write(&self.response_to.to_le_bytes()).await?;
47-
stream.write(&(self.op_code as i32).to_le_bytes()).await?;
44+
stream.write_all(&self.length.to_le_bytes()).await?;
45+
stream.write_all(&self.request_id.to_le_bytes()).await?;
46+
stream.write_all(&self.response_to.to_le_bytes()).await?;
47+
stream
48+
.write_all(&(self.op_code as i32).to_le_bytes())
49+
.await?;
4850

4951
Ok(())
5052
}

src/test/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl TestClient {
402402
None => default_options,
403403
};
404404
if Self::new().await.is_sharded() && !use_multiple_mongoses {
405-
options.hosts = options.hosts.iter().cloned().take(1).collect();
405+
options.hosts = options.hosts.iter().take(1).cloned().collect();
406406
}
407407
options
408408
}

0 commit comments

Comments
 (0)