Mercurial > public > mercurial-scm > hg
comparison rust/hg-core/src/dirstate_tree/status.rs @ 48026:1b2ee68e85f9
rust: Remove EntryState::Unknown
This enum variant represented the `state == '?'` case, which was used
to represent the absence of a dirstate entry/item (and therefore of that
entry?s state).
Now that previous refactors have removed this use in the Python/Rust
FFI APIs, the remaining uses can be removed by replacing `EntryState`
by `Option<EntryState>` where appropriate, using `None` to represent
the absence of an entry.
Differential Revision: https://phab.mercurial-scm.org/D11465
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 20 Sep 2021 20:55:38 +0200 |
parents | f2a9db29cb2d |
children | 0cc0c0972164 |
comparison
equal
deleted
inserted
replaced
48025:631f6b445a77 | 48026:1b2ee68e85f9 |
---|---|
392 .unwrap() | 392 .unwrap() |
393 .modified | 393 .modified |
394 .push(hg_path.detach_from_tree()), | 394 .push(hg_path.detach_from_tree()), |
395 EntryState::Normal => self | 395 EntryState::Normal => self |
396 .handle_normal_file(&dirstate_node, fs_metadata)?, | 396 .handle_normal_file(&dirstate_node, fs_metadata)?, |
397 // This variant is not used in DirstateMap | |
398 // nodes | |
399 EntryState::Unknown => unreachable!(), | |
400 } | 397 } |
401 } else { | 398 } else { |
402 // `node.entry.is_none()` indicates a "directory" | 399 // `node.entry.is_none()` indicates a "directory" |
403 // node, but the filesystem has a file | 400 // node, but the filesystem has a file |
404 self.mark_unknown_or_ignored( | 401 self.mark_unknown_or_ignored( |