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
58 /// if not exactly two signatures were iterable.58 /// if not exactly two signatures were iterable.
59 /// Errors are not the common case - if an error needs to be detectable, use this instance as iterator.59 /// Errors are not the common case - if an error needs to be detectable, use this instance as iterator.
60 pub fn signatures(&'a mut self) -> impl Iterator<Item = git_actor::SignatureRef<'_>> + 'a {60 pub fn signatures(&'a mut self) -> impl Iterator<Item = git_actor::SignatureRef<'_>> + 'a {
61 self.filter_map(Result::ok)61 self.filter_map(|t| match t {
62 .skip_while(|t| !matches!(t, Token::Author { .. } | Token::Committer { .. }))62 Ok(Token::Author { signature }) | Ok(Token::Committer { signature }) => Some(signature),
63 .filter_map(|t| match t {63 _ => None,
64 Token::Author { signature } | Token::Committer { signature } => Some(signature),64 })
65 _ => None,
66 })
67 }65 }
68 66
69 /// Returns the committer signature if there is no decoding error.67 /// Returns the committer signature if there is no decoding error.