We rearrange the code to single out the case where information need to be
overwritten on both side of the merge. This open the way to better dealing with
this case.
Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG2076df13d00f: copies-rust: refactor the "deletion" case
rHGae57e0792c41: copies-rust: refactor the "deletion" case
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
521 | This would be better as p1_copies.map(...) |
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
521 | <suspiciously looking at map(β¦)> How would that work ? |
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
521 | let p1_entry = p1_copies.as_mut().map( |copies| match copies.entry(deleted) { Entry::Occupied(e) => Some(e), Entry::Vacant(_) => None, } ); You need as_mut() as well. |
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
521 | This would create Option of Option, so I';ll keep the current code. |
rust/hg-core/src/copy_tracing.rs | ||
---|---|---|
521 | Yeah, I meant Option::and, but it seems like the compiler is not able to infer the closure types. So let's keep it that way. |
This would be better as p1_copies.map(...)