mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
feat: add is_empty method to GitIndexCache and refactor Hungarian algorithm loop
- Introduced `is_empty` method in `GitIndexCache` to check if the cache has any entries. - Refactored the loop in the `min_cost_assignment` function in `hungarian.rs` to use `enumerate` for improved readability and efficiency.
This commit is contained in:
parent
a901848861
commit
22808e6140
2 changed files with 7 additions and 3 deletions
|
|
@ -306,6 +306,10 @@ impl GitIndexCache {
|
|||
self.entries.len()
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.entries.is_empty()
|
||||
}
|
||||
|
||||
/// Returns `true` if the new content's blob SHA1 matches the git index
|
||||
/// entry for this path, meaning the file on disk almost certainly
|
||||
/// already has this content.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue