Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 48024:cedfe2606adf
debugsate: Change debug_iter() to yield tuples instead of DirstateItem
This removes the need for `DirstateItem`?to support the `state == ' '`
special case which represents dirstate tree nodes without an item.
Differential Revision: https://phab.mercurial-scm.org/D11463
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 20 Sep 2021 20:20:55 +0200 |
parents | 357307feaf61 |
children | d5528ac9b4f2 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Sep 20 19:59:09 2021 +0200 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Mon Sep 20 20:20:55 2021 +0200 @@ -20,7 +20,6 @@ use crate::{ dirstate::copymap::{CopyMap, CopyMapItemsIterator, CopyMapKeysIterator}, dirstate::make_dirstate_item, - dirstate::make_dirstate_item_raw, dirstate::non_normal_entries::{ NonNormalEntries, NonNormalEntriesIterator, }, @@ -612,8 +611,8 @@ let (path, (state, mode, size, mtime)) = item.map_err(|e| v2_error(py, e))?; let path = PyBytes::new(py, path.as_bytes()); - let item = make_dirstate_item_raw(py, state, mode, size, mtime)?; - dirs.append(py, (path, item).to_py_object(py).into_object()) + let item = (path, state, mode, size, mtime); + dirs.append(py, item.to_py_object(py).into_object()) } Ok(dirs) }