Commit 2fd160d
committed
refactor: simplify wrap_value by removing redundant empty map check
Remove unnecessary empty map check in wrap_value function. The check
was replacing an empty Map with Map::new(), which is functionally
identical since both produce empty JSON objects when serialized.
The simplified version:
- Reduces code from 18 to 10 lines
- Maintains identical behavior for all inputs
- Passes all existing tests including property tests
- Produces no clippy warnings
Fixes #471 parent 9143a29 commit 2fd160d
1 file changed
Lines changed: 4 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 175 | + | |
182 | 176 | | |
183 | | - | |
| 177 | + | |
184 | 178 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 179 | + | |
188 | 180 | | |
189 | 181 | | |
190 | 182 | | |
| |||
0 commit comments