This avoid a double iteration and this open the way to a better handing of
deletion. That better handling of deletion is the core reason we are doing this
refactoring.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
472 | I'd rather use a if let (None, None) = (&base_p1_copies, &base_p2_copies) , but it's not a big deal. | |
477 | This is let mut p1_copies = base_p1_copies.clone(); | |
487 | Looks like you're doing a clone that isn't needed unless we're in the ::Removed case and then unwrapping. |
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
487 | You're right, I'm blind. :) |
I'd rather use a if let (None, None) = (&base_p1_copies, &base_p2_copies) , but it's not a big deal.