Skip to content

Commit

Permalink
Merge pull request #953 from ehuss/remove-mut
Browse files Browse the repository at this point in the history
Remove mut when not needed
  • Loading branch information
ehuss authored May 5, 2023
2 parents 88c67f7 + 088881f commit 41526ca
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 41526ca

Please sign in to comment.