This categorizes them semantically without using the overloaded names of owning and borrowing, which mean different things in Rust.
Showing the changes to git-object/src/commit.rs (1 of 34 files). Show all
Unified · Split
| @@ -1,7 +1,7 @@ | ||
| 1 | −use crate::borrowed; | |
| 1 | +use crate::immutable; | |
| 2 | 2 | use bstr::{BStr, ByteSlice}; |
| 3 | 3 | |
| 4 | −/// An iterator over extra headers in [owned][crate::owned::Commit] and [borrowed][borrowed::Commit] commits. | |
| 4 | +/// An iterator over extra headers in [owned][crate::mutable::Commit] and [borrowed][immutable::Commit] commits. | |
| 5 | 5 | pub struct ExtraHeaders<I> { |
| 6 | 6 | inner: I, |
| 7 | 7 | } |
| @@ -29,8 +29,8 @@ where · 21 unmodified lines | ||
| 29 | 29 | /// |
| 30 | 30 | /// A merge tag is a tag object embedded within the respective header field of a commit, making |
| 31 | 31 | /// it a child object of sorts. |
| 32 | − pub fn mergetags(self) -> impl Iterator<Item = Result<borrowed::Tag<'a>, borrowed::Error>> { | |
| 33 | − self.find_all("mergetag").map(|b| borrowed::Tag::from_bytes(b)) | |
| 32 | + pub fn mergetags(self) -> impl Iterator<Item = Result<immutable::Tag<'a>, immutable::Error>> { | |
| 33 | + self.find_all("mergetag").map(|b| immutable::Tag::from_bytes(b)) | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /// Return the cryptographic signature provided by gpg/pgp verbatim. |