History

[actor #173] rename immutable::Signature to SignatureRef!

Sebastian Thiel committed 5 years ago

Commit 96461ac1 parent c2bc1a629 files · +258 −262Browse files

Showing the changes to git-object/src/immutable/commit (2 of 29 files). Show all

Unified · Split

2 files
  1. git-object/src/immutable/commit/iter.rs +4 −4
  2. git-object/src/immutable/commit/mod.rs +2 −2
git-object/src/immutable/commit/iter.rs+4−4
@@ -35,7 +35,7 @@ impl Default for State { · 34 unmodified lines
3535 }
3636 }
3737
38−/// Like [`immutable::Commit`][super::Commit], but as `Iterator` to support (up to) entirely allocation free parsing.
38+/// Like [`signature_ref::Commit`][super::Commit], but as `Iterator` to support (up to) entirely allocation free parsing.
3939 /// It's particularly useful to traverse the commit graph without ever allocating arrays for parents.
4040 pub struct Iter<'a> {
4141 data: &'a [u8],
@@ -67,7 +67,7 @@ impl<'a> Iter<'a> { · 25 unmodified lines
6767 /// Errors are coerced into options, hiding whether there was an error or not. The caller knows if there was an error or not
6868 /// if not exactly two signatures were iterable.
6969 /// Errors are not the common case - if an error needs to be detectable, use this instance as iterator.
70− pub fn signatures(&'a mut self) -> impl Iterator<Item = git_actor::immutable::Signature<'_>> + 'a {
70+ pub fn signatures(&'a mut self) -> impl Iterator<Item = git_actor::SignatureRef<'_>> + 'a {
7171 self.filter_map(Result::ok)
7272 .skip_while(|t| !matches!(t, Token::Author { .. } | Token::Committer { .. }))
7373 .filter_map(|t| match t {
@@ -208,11 +208,11 @@ pub enum Token<'a> { · 134 unmodified lines
208208 },
209209 /// A person who authored the content of the commit.
210210 Author {
211− signature: git_actor::immutable::Signature<'a>,
211+ signature: git_actor::SignatureRef<'a>,
212212 },
213213 /// A person who committed the authors work to the repository.
214214 Committer {
215− signature: git_actor::immutable::Signature<'a>,
215+ signature: git_actor::SignatureRef<'a>,
216216 },
217217 Encoding(&'a BStr),
218218 ExtraHeader((&'a BStr, Cow<'a, BStr>)),
git-object/src/immutable/commit/mod.rs+2−2
@@ -24,12 +24,12 @@ pub struct Commit<'a> { · 23 unmodified lines
2424 /// HEX hash of each parent commit. Empty for first commit in repository.
2525 pub parents: SmallVec<[&'a BStr; 2]>,
2626 /// Who wrote this commit.
27− pub author: git_actor::immutable::Signature<'a>,
27+ pub author: git_actor::SignatureRef<'a>,
2828 /// Who committed this commit.
2929 ///
3030 /// This may be different from the `author` in case the author couldn't write to the repository themselves and
3131 /// is commonly encountered with contributed commits.
32− pub committer: git_actor::immutable::Signature<'a>,
32+ pub committer: git_actor::SignatureRef<'a>,
3333 /// The name of the message encoding, otherwise [UTF-8 should be assumed](https://github.com/git/git/blob/e67fbf927dfdf13d0b21dc6ea15dc3c7ef448ea0/commit.c#L1493:L1493).
3434 pub encoding: Option<&'a BStr>,
3535 /// The commit message documenting the change.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t