refactor(sync): destructure remote in deleted-local branch
The `(None, Some(_), Some(b))` arm re-checked the already-matched `remote` via `remote.is_some_and(...)`, which obscures intent and compiles to redundant None-branch code. Bind `Some(r)` in the match and use `r` directly. No behavior change.
This commit is contained in:
parent
1bb1b67977
commit
970210b647
|
|
@ -204,8 +204,9 @@ pub fn compute_sync_actions(
|
|||
}
|
||||
|
||||
// Remote present, local gone, base known: local was deleted
|
||||
(None, Some(_), Some(b)) => {
|
||||
let remote_changed = remote.is_some_and(|r| r.size != b.size || !timestamps_equal(r.last_modified.as_deref(), b.modified_at.as_deref()));
|
||||
(None, Some(r), Some(b)) => {
|
||||
let remote_changed = r.size != b.size
|
||||
|| !timestamps_equal(r.last_modified.as_deref(), b.modified_at.as_deref());
|
||||
if remote_changed {
|
||||
// deleted locally + modified remotely -> download (remote wins)
|
||||
actions.push(SyncAction::Download { path: path.to_string() });
|
||||
|
|
|
|||
Loading…
Reference in a new issue