Keats / validator

Simple validation for Rust structs
MIT License
2.07k stars 152 forks source link

Fix Merge issues between custom and nested #359

Open pvichivanives opened 3 weeks ago

pvichivanives commented 3 weeks ago

A response that should fix #357 Did not include the test in this PR since it should be merged in from #357

Slight behavior change in that it creates a nested output if both merge cases exist but since its a bug fix should be called a patch/minor? (Given that this behavior is better than a panic)

Called an unwrap here to show error output from #357

image
pvichivanives commented 3 weeks ago

One comment here is it could make sense to join it in a list rather than the map we currently have with nested/self. Would require more logic but It shouldn't be too difficult. Would like thoughts on this though so I put up the simplest clean solution

gonzedge commented 2 weeks ago

Without my limited knowledge of this codebase, this seems like a reasonable short-term solution. Agree that joining it in a list instead of the current map would make sense.

Thanks for taking a stab at it!