rhg: in path_encode add a DestArr type
This is an implementation of Sink trait that writes into a fixed-size
buffer on the stack, so identical to what was done before, but
it makes the code of [hash_encode] easier to understand by dropping
all these slice manipulations.
rhg: reduce verbosity in path_encode by using a trait for writing
Hopefully this makes the code easier to read and understand and
shorter overall.
It also lets us later tweak the type we use as a [Sink],
without having to change the encoding functions, including using
two different types for size measurement and for the actual
serialization.
refactor: simplify code in rust version of path_encode
Moving the addition of '/' separator to the end of the loop makes the rest
of the logic much simpler because the first iteration is no longer special.
dirstate: phase-divergent update to
4e95341c89aa
Heptapod published the obsolete version of those.
dirstate: phase-divergent update to
65943224c184
Heptapod published the obsolete version of those.
dirstate: phase-divergent update to
3433723d1b9b
Heptapod published the obsolete version of those.