Write a catalog entry's `mod.json` (used by dev seeding; writes no artifact, so the seeded entry carries a synthetic `size_bytes` and isn't downloadable).
(&self, entry: &ModCatalogEntry)
| 234 | if let Some(prefix) = &self.prefix { |
| 235 | ObjectPath::from(format!("{}/{}", prefix.as_ref(), path.as_ref())) |
| 236 | } else { |
| 237 | path |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | fn list_prefix(&self) -> Option<&ObjectPath> { |
| 242 | self.prefix.as_ref() |
| 243 | } |
| 244 | |
| 245 | fn strip_prefix<'a>(&self, path: &'a ObjectPath) -> &'a str { |
| 246 | let path = path.as_ref(); |
| 247 | if let Some(prefix) = &self.prefix { |
| 248 | path.strip_prefix(prefix.as_ref()) |
| 249 | .and_then(|rest| rest.strip_prefix('/')) |
no test coverage detected