fix: 优化disks_layout

This commit is contained in:
shiro.lee
2024-07-02 18:51:50 +08:00
parent d1a62f6697
commit a225663049
4 changed files with 208 additions and 238 deletions
+5
View File
@@ -76,6 +76,11 @@ impl ArgPattern {
ret
}
/// returns the total number of sizes in the given patterns.
pub fn total_sizes(&self) -> usize {
self.inner.iter().map(|v| v.seq.len()).sum()
}
}
/// finds all ellipses patterns, recursively and parses the ranges numerically.