History

adapt to breaking changes in git-actor

Sebastian Thiel committed 4 years ago

Commit 40c48c31 parent 5c8b0a412 files · +39 −31Browse files

Showing the changes to git-object/src/commit (1 of 12 files). Show all

Unified · Split

git-object/src/commit/ref_iter.rs+4−6
@@ -58,12 +58,10 @@ impl<'a> CommitRefIter<'a> { · 57 unmodified lines
5858 /// if not exactly two signatures were iterable.
5959 /// Errors are not the common case - if an error needs to be detectable, use this instance as iterator.
6060 pub fn signatures(&'a mut self) -> impl Iterator<Item = git_actor::SignatureRef<'_>> + 'a {
61− self.filter_map(Result::ok)
62− .skip_while(|t| !matches!(t, Token::Author { .. } | Token::Committer { .. }))
63− .filter_map(|t| match t {
64− Token::Author { signature } | Token::Committer { signature } => Some(signature),
65− _ => None,
66− })
61+ self.filter_map(|t| match t {
62+ Ok(Token::Author { signature }) | Ok(Token::Committer { signature }) => Some(signature),
63+ _ => None,
64+ })
6765 }
6866
6967 /// Returns the committer signature if there is no decoding error.