Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/dirstate/dirstate_map.rs @ 49124:d9a66d62c604
rust-dirstatemap: use `&HgPath` instead of `HgPathBuf` in `copy_map_insert`
No reason to require an owned path here.
Differential Revision: https://phab.mercurial-scm.org/D12522
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 30 Mar 2022 11:39:53 +0200 |
parents | 861dd252e2dc |
children | a1fce5003ff4 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/dirstate/dirstate_map.rs Tue Mar 29 17:23:24 2022 +0200 +++ b/rust/hg-cpython/src/dirstate/dirstate_map.rs Wed Mar 30 11:39:53 2022 +0200 @@ -23,13 +23,10 @@ pybytes_deref::PyBytesDeref, }; use hg::{ - dirstate::StateMapIter, - dirstate_tree::on_disk::DirstateV2ParseError, - dirstate_tree::owning::OwningDirstateMap, - revlog::Node, - utils::files::normalize_case, - utils::hg_path::{HgPath, HgPathBuf}, - DirstateEntry, DirstateError, DirstateParents, EntryState, + dirstate::StateMapIter, dirstate_tree::on_disk::DirstateV2ParseError, + dirstate_tree::owning::OwningDirstateMap, revlog::Node, + utils::files::normalize_case, utils::hg_path::HgPath, DirstateEntry, + DirstateError, DirstateParents, EntryState, }; // TODO @@ -411,8 +408,8 @@ self.inner(py) .borrow_mut() .copy_map_insert( - HgPathBuf::from_bytes(key.data(py)), - HgPathBuf::from_bytes(value.data(py)), + HgPath::new(key.data(py)), + HgPath::new(value.data(py)), ) .map_err(|e| v2_error(py, e))?; Ok(py.None())