Commit ca2f0ff
refactor(codec): drop redundant buf.is_empty() guards
`<[u8]>::starts_with` on an empty buffer with a non-empty prefix
already returns false, so the `buf.is_empty() || !buf.starts_with(MAGIC)`
guard in each `try_decode_python_*_udf` function reduces to just
`!buf.starts_with(MAGIC)`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ddd76f8 commit ca2f0ff
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
0 commit comments