fix: mixed-case validation in hrp::parse_display#277
Conversation
|
Needs unit test. Done as a separate patch last so review can verify the bug this fixes. |
81cbcd5 to
e2d6c15
Compare
|
I've extracted the test into separate commit, please check |
|
Thanks, still a couple things to fix please:
Thanks |
|
I'm reasonably sure this was mentioned to you on another PR. I'm also still uncertain how much of you work is human and how much LLM. If you are using an LLM you will need to configure it to remember stuff we mention in review otherwise it waists review time. Of course simply forgetting things if you are actually human is ok. |
|
On further thought the tests are probably too verbose. Why not just use the one in the issue (witthout all the code comments). |
e2d6c15 to
d001d1e
Compare
Move `has_lower` and `has_upper` flags from local variables inside `write_str` to fields on the `ByteFormatter` struct to ensure that case validation persists across multiple `write_str` calls Fixes: rust-bitcoin#276
Move `has_lower` and `has_upper` flags from local variables inside `write_str` to fields on the `ByteFormatter` struct to ensure that case validation persists across multiple `write_str` calls This commit only adds unit test to reproduce the issue, no real fix Fixes: rust-bitcoin#276
d001d1e to
a5312e7
Compare
|
I have rearranged the commit and cleaned the test. Note that example from Loupe in fact doesn't work, I've added a case to show this. |
Move
has_lowerandhas_upperflags from local variables insidewrite_strto fields on theByteFormatterstruct. This ensures that case validation persists across multiplewrite_strcalls (e.g., when processing splitDisplayarguments) instead of resetting on each boundary.Fixes: #276