Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 2, 2025
1 parent da78d3c commit 3a925c0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ pub fn cherry_pick(

let mut tip_id = head_id;
while let Some(op) = rebase.next() {
op.map_err(|e| {
op.inspect_err(|_err| {
let _ = rebase.abort();
e
})?;
let inmemory_index = rebase.inmemory_index().unwrap();
if inmemory_index.has_conflicts() {
Expand Down Expand Up @@ -122,9 +121,8 @@ pub fn cherry_pick(
// For simple rebases, preserve the original commit time
sig = git2::Signature::new(name, email, &cherry_commit.time())?.to_owned();
}
let commit_id = rebase.commit(None, &sig, None).map_err(|e| {
let commit_id = rebase.commit(None, &sig, None).inspect_err(|_err| {
let _ = rebase.abort();
e
});
let commit_id = match commit_id {
Ok(commit_id) => Ok(commit_id),
Expand Down

0 comments on commit 3a925c0

Please sign in to comment.