| 174 | } |
| 175 | |
| 176 | fn get_par(&self, keys: &[&str]) -> Result<Vec<Vec<u8>>> { |
| 177 | let repo = self.repo.clone(); |
| 178 | let path_to_oid = &self.path_to_oid; |
| 179 | keys.into_par_iter() |
| 180 | .map(|key| { |
| 181 | let oid = path_to_oid |
| 182 | .get(*key) |
| 183 | .with_context(|| format!("key not found: {key}"))?; |
| 184 | Ok(repo |
| 185 | .to_thread_local() |
| 186 | .find_blob(*oid) |
| 187 | .with_context(|| format!("failed to find blob for key: {key}"))? |
| 188 | .data |
| 189 | .to_vec()) |
| 190 | }) |
| 191 | .collect() |
| 192 | } |
| 193 | |
| 194 | fn glob(&self, pattern: &str) -> Result<Vec<String>> { |
| 195 | let pat = glob::Pattern::new(pattern).context("failed to compile glob pattern")?; |