sociomantic-tsunami / ocean

General purpose, platform-dependent, high-performance library for D
Other
61 stars 56 forks source link

Fix Formatter to handle inout(char) properly #858

Closed Geod24 closed 2 years ago

Geod24 commented 2 years ago
We know this construct doesn't allocate, and avoids the need
for Unqual entirely.
Geod24 commented 2 years ago

As a first step, I only committed the test, and it failed as expected:

./src/ocean/text/convert/Formatter.d(549): Error: cannot modify `inout` expression `b[1]`
./src/ocean/text/convert/Formatter.d(279): Error: template instance `ocean.text.convert.Formatter.handle!(inout(char))` error instantiating
./src/ocean/text/convert/Formatter.d(137):        instantiated from here: `sformat!(inout(char))`
./src/ocean/text/convert/Formatter_test.d(575):        instantiated from here: `format!(inout(char))`
make: *** [/home/runner/work/ocean/ocean/build/prod/tmp/allunittests] Error 1
codecov[bot] commented 2 years ago

Codecov Report

Merging #858 (d15e2e8) into v6.x.x (6a269ff) will decrease coverage by 0.00%. The diff coverage is 100.00%.