[`Self::insert`] for bytes another holder already shares (a repository entry's bytes): no copy is made.
(
&mut self,
algorithm: GitHashAlgorithm,
kind: GitObjectKind,
bytes: Arc<[u8]>,
)
| 841 | /// [`Self::insert`] for bytes another holder already shares (a |
| 842 | /// repository entry's bytes): no copy is made. |
| 843 | pub fn insert_shared( |
| 844 | &mut self, |
| 845 | algorithm: GitHashAlgorithm, |
| 846 | kind: GitObjectKind, |
| 847 | bytes: Arc<[u8]>, |
| 848 | ) -> Result<GitObjectId, ProjectTreeError> { |
| 849 | let oid = git_object_id(algorithm, kind, &bytes)?; |
| 850 | self.objects.insert(oid.clone(), GitObject { kind, bytes }); |
| 851 | Ok(oid) |
| 852 | } |
| 853 | |
| 854 | pub fn parse_manifest( |
| 855 | &self, |
no test coverage detected