(&mut self, n: usize)
| 1480 | leaf_ids.sort_unstable(); |
| 1481 | let mut shard_ids: Vec<u32> = shards.iter().map(|s| s.id).collect(); |
| 1482 | shard_ids.sort_unstable(); |
| 1483 | if leaf_ids != shard_ids { |
| 1484 | return Err(format!( |
| 1485 | "bisection tree leaves ({} ids) do not match the manifest's shard \ |
| 1486 | id set ({num_shards} shards)", |
| 1487 | leaf_ids.len() |
| 1488 | )); |
| 1489 | } |
| 1490 | } |
| 1491 | Ok(ShardManifest { |
| 1492 | num_shards: num_shards as u32, |
| 1493 | shards, |
no test coverage detected