Skip to content

Commit

Permalink
Remove mut when not needed
Browse files Browse the repository at this point in the history
A false negative for unused_mut was fixed in rust-lang/rust#110960.
  • Loading branch information
ehuss committed May 5, 2023
1 parent 88c67f7 commit 088881f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl<'repo> Diff<'repo> {
assert!(patch_no > 0);
assert!(patch_no <= total_patches);
let mut default = DiffFormatEmailOptions::default();
let mut raw_opts = opts.map_or(&mut default.raw, |opts| &mut opts.raw);
let raw_opts = opts.map_or(&mut default.raw, |opts| &mut opts.raw);
let summary = commit.summary_bytes().unwrap();
let mut message = commit.message_bytes();
assert!(message.starts_with(summary));
Expand Down
2 changes: 1 addition & 1 deletion src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ extern "C" fn subtransport_action(
n => panic!("unknown action: {}", n),
};

let mut transport = &mut *(raw_transport as *mut RawSmartSubtransport);
let transport = &mut *(raw_transport as *mut RawSmartSubtransport);
// Note: we only need to generate if rpc is on. Else, for receive-pack and upload-pack
// libgit2 reuses the stream generated for receive-pack-ls or upload-pack-ls.
let generate_stream =
Expand Down

0 comments on commit 088881f

Please sign in to comment.