Skip to content

Remove mut when not needed #953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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