Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/lib.rs @ 42748:7cae6bc29ff9
rust-parsers: switch to parse/pack_dirstate to mutate-on-loop
Both `parse_dirstate` and `pack_dirstate` can operate directly on the data
they're passed, which prevents the creation of intermediate data structures,
simplifies the function signatures and reduces boilerplate. They are exposed
directly to the Python for now, but a later patch will make use of them inside
`hg-core`.
Differential Revision: https://phab.mercurial-scm.org/D6628
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 09 Jul 2019 11:49:49 +0200 |
parents | 5672bb73f61e |
children | 7ceded4419a3 |
line wrap: on
line diff
--- a/rust/hg-core/src/lib.rs Wed Jul 10 10:16:28 2019 +0200 +++ b/rust/hg-core/src/lib.rs Tue Jul 09 11:49:49 2019 +0200 @@ -10,9 +10,8 @@ pub mod testing; // unconditionally built, for use from integration tests pub use dirstate::{ dirs_multiset::DirsMultiset, - parsers::{pack_dirstate, parse_dirstate}, - CopyVec, CopyVecEntry, DirsIterable, DirstateEntry, DirstateParents, - DirstateVec, + parsers::{pack_dirstate, parse_dirstate, PARENT_SIZE}, + CopyMap, DirsIterable, DirstateEntry, DirstateParents, StateMap, }; mod filepatterns; pub mod utils; @@ -60,6 +59,7 @@ TooLittleData, Overflow, CorruptedEntry(String), + Damaged, } #[derive(Debug, PartialEq)]