Additionally ergonomics have been improved as the iterator is now `Copy`, similarly to the other iterators.
Showing the changes to git-object/src/commit (1 of 4 files). Show all
Unified · Split
| @@ -77,7 +77,6 @@ impl<'a> CommitRefIter<'a> { · 76 unmodified lines | ||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /// Returns the committer signature if there is no decoding error. |
| 80 | − /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not. | |
| 81 | 80 | pub fn committer(mut self) -> Result<git_actor::SignatureRef<'a>, crate::decode::Error> { |
| 82 | 81 | self.find_map(|t| match t { |
| 83 | 82 | Ok(Token::Committer { signature }) => Some(Ok(signature)), |
| @@ -90,7 +89,6 @@ impl<'a> CommitRefIter<'a> { · 6 unmodified lines | ||
| 90 | 89 | /// Returns the author signature if there is no decoding error. |
| 91 | 90 | /// |
| 92 | 91 | /// It may contain white space surrounding it, and is exactly as parsed. |
| 93 | − /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not. | |
| 94 | 92 | pub fn author(mut self) -> Result<git_actor::SignatureRef<'a>, crate::decode::Error> { |
| 95 | 93 | self.find_map(|t| match t { |
| 96 | 94 | Ok(Token::Author { signature }) => Some(Ok(signature)), |
| @@ -104,7 +102,6 @@ impl<'a> CommitRefIter<'a> { · 7 unmodified lines | ||
| 104 | 102 | /// |
| 105 | 103 | /// It may contain white space surrounding it, and is exactly as |
| 106 | 104 | // parsed. |
| 107 | − /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not. | |
| 108 | 105 | pub fn message(mut self) -> Result<&'a BStr, crate::decode::Error> { |
| 109 | 106 | self.find_map(|t| match t { |
| 110 | 107 | Ok(Token::Message(msg)) => Some(Ok(msg)), |