(
&self,
ids: Vec<ExternalId>,
take: usize,
context_id: RepoId,
)
| 165 | } |
| 166 | |
| 167 | pub async fn fetch_objects_with_context( |
| 168 | &self, |
| 169 | ids: Vec<ExternalId>, |
| 170 | take: usize, |
| 171 | context_id: RepoId, |
| 172 | ) -> Result<Vec<git::Object>> { |
| 173 | let keys = ids |
| 174 | .into_iter() |
| 175 | .take(take) |
| 176 | .map(|oid| Okey(oid, context_id)) |
| 177 | .collect::<Vec<Okey>>(); |
| 178 | |
| 179 | Ok(self |
| 180 | .object_loader |
| 181 | .load_many(keys) |
| 182 | .await? |
| 183 | .into_values() |
| 184 | .collect::<Vec<git::Object>>()) |
| 185 | } |
| 186 | |
| 187 | pub async fn fetch_topic(&self, topic_id: ExternalId) -> Result<Option<git::Topic>> { |
| 188 | let key = Okey(topic_id, self.viewer.context_repo_id); |
no test coverage detected