History

More speedy access to author/committer (#364)

Sebastian Thiel committed 4 years ago

Commit 61296071 parent 3079e114 files · +34 −16Browse files

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

Unified · Split

git-object/src/commit/ref_iter.rs+3−3
@@ -77,7 +77,7 @@ impl<'a> CommitRefIter<'a> { · 76 unmodified lines
7777
7878 /// Returns the committer signature if there is no decoding error.
7979 /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not.
80− pub fn committer(&mut self) -> Option<git_actor::SignatureRef<'_>> {
80+ pub fn committer(mut self) -> Option<git_actor::SignatureRef<'a>> {
8181 self.find_map(|t| match t {
8282 Ok(Token::Committer { signature }) => Some(signature),
8383 _ => None,
@@ -86,7 +86,7 @@ impl<'a> CommitRefIter<'a> { · 2 unmodified lines
8686
8787 /// Returns the author signature if there is no decoding error.
8888 /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not.
89− pub fn author(&mut self) -> Option<git_actor::SignatureRef<'_>> {
89+ pub fn author(mut self) -> Option<git_actor::SignatureRef<'a>> {
9090 self.find_map(|t| match t {
9191 Ok(Token::Author { signature }) => Some(signature),
9292 _ => None,
@@ -95,7 +95,7 @@ impl<'a> CommitRefIter<'a> { · 2 unmodified lines
9595
9696 /// Returns the message if there is no decoding error.
9797 /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not.
98− pub fn message(&mut self) -> Option<&'a BStr> {
98+ pub fn message(mut self) -> Option<&'a BStr> {
9999 self.find_map(|t| match t {
100100 Ok(Token::Message(msg)) => Some(msg),
101101 _ => None,