Skip to content

Commit 8249b3d

Browse files
authored
Merge pull request #309 from danieleades/clippy/needless-mut-passed
don't pass mut references unless you need to
2 parents 92da4dd + 64a83db commit 8249b3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

async-byte-channel/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub mod test {
176176
drop(receiver);
177177

178178
let mut pool = futures::executor::LocalPool::new();
179-
let result = pool.run_until(sender.write_all(&mut [0,1,2]));
179+
let result = pool.run_until(sender.write_all(&[0,1,2]));
180180
assert!(result.is_err());
181181
}
182182
}

capnp/src/any_pointer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ fn init_clears_value() {
239239
}
240240

241241
let mut output: Vec<u8> = Vec::new();
242-
crate::serialize::write_message(&mut output, &mut message).unwrap();
242+
crate::serialize::write_message(&mut output, &message).unwrap();
243243
assert_eq!(output.len(), 40);
244244
for byte in &output[8..] {
245245
// Everything not in the message header is zero.

0 commit comments

Comments
 (0)