diff --git a/git-repository/src/revision/spec/parse/delegate.rs b/git-repository/src/revision/spec/parse/delegate.rs index 5094bac5f82..f23aa7e79d9 100644 --- a/git-repository/src/revision/spec/parse/delegate.rs +++ b/git-repository/src/revision/spec/parse/delegate.rs @@ -310,7 +310,7 @@ impl<'repo> delegate::Navigate for Delegate<'repo> { } }) }) { - Ok(commit) => match commit.parent_ids().skip(num.saturating_sub(1)).next() { + Ok(commit) => match commit.parent_ids().nth(num.saturating_sub(1)) { Some(id) => replacements.push((commit.id, id.detach())), None => errors.push(( commit.id,