[`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]>,
)
| 863 | /// [`Self::insert`] for bytes another holder already shares (a |
| 864 | /// repository entry's bytes): no copy is made. |
| 865 | pub fn insert_shared( |
| 866 | &mut self, |
| 867 | algorithm: GitHashAlgorithm, |
| 868 | kind: GitObjectKind, |
| 869 | bytes: Arc<[u8]>, |
| 870 | ) -> Result<GitObjectId, ProjectTreeError> { |
| 871 | let oid = git_object_id(algorithm, kind, &bytes)?; |
| 872 | self.objects.insert(oid.clone(), GitObject { kind, bytes }); |
| 873 | Ok(oid) |
| 874 | } |
| 875 | |
| 876 | pub fn parse_manifest( |
| 877 | &self, |
no test coverage detected