Make Debug instances behave like those for slices #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The indentantion in case of structs inside the
arrays was wrong with pretty debug instance.
Instead of rolling one by hand, just use the
underlying slice implementation. It appears that
this was even the intention orginally, based on
the
TinyVec_pretty_debugtest. The main issue is that the test used a simple value instead of astruct so it missed the problem. FWIW I have kept
the existing test but I think it could just be
deleted now.
I haven't touched the
Displayversion becausewhile slices have a
Debugimpl, there isn't onefor
Display. So I think probablyDisplayhasthe same problem.
These tests can technically be written in a
non-alloc/non-std way by defining an array-backed
buffer and giving it
core::fmt::Writebut I wastoo lazy to do so: it doesn't seem useful.
Fixes #192.