Page MenuHomePhabricator

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

Authored by SimonSapin on Wed, Feb 17, 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.Wed, Feb 17, 7:58 AM
Alphare accepted this revision.Thu, Feb 18, 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.Fri, Feb 19, 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.Fri, Feb 19, 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.