This is an archive of the discontinued Mercurial Phabricator instance.

rust: Rewrite dirstate parsing usin the `bytes-cast` crate
ClosedPublic

Authored by SimonSapin on Feb 17 2021, 7:58 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Feb 17 2021, 7:58 AM
Alphare accepted this revision.Feb 18 2021, 4:13 AM
Alphare added a subscriber: Alphare.
Alphare added inline comments.
rust/hg-core/src/dirstate/parsers.rs
53

We could possibly drop the dependency on memchr then. I wrote this code when I was first starting with Rust, it's likely that I had no idea that splitn existed or something.

SimonSapin marked an inline comment as done.Feb 19 2021, 3:02 AM
SimonSapin added inline comments.
rust/hg-core/src/dirstate/parsers.rs
53

Good point. I’m removing the direct dependency, though it’s still an indirect dependency through regex.

SimonSapin marked an inline comment as done.Feb 19 2021, 3:30 AM
SimonSapin updated this revision to Diff 25659.
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.