Skip to content

Conversation

@panbanda
Copy link
Owner

Summary

  • Use iterator chains instead of manual index loops in build_indexes
  • Use .map(...).unwrap_or_default() pattern in helper methods
  • Use iterator chaining in all_elements() instead of manual Vec building
  • Use bytes().zip().take_while().count() for common_prefix_len
  • Fix get_element to use O(1) lookup (store ElementType with index)
  • Skip asset test when frontend not built (conditional check)

Test plan

  • All 214 tests pass with cargo test
  • No behavioral changes, only code style improvements

Generated with Claude Code

- Use iterator chains instead of manual index loops in build_indexes
- Use .map(...).unwrap_or_default() pattern in helper methods
- Use iterator chaining in all_elements() instead of manual Vec building
- Use bytes().zip().take_while().count() for common_prefix_len
- Fix get_element to use O(1) lookup (store ElementType with index)
- Skip asset test when frontend not built (conditional check)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@panbanda
Copy link
Owner Author

@panbanda Ready for review - idiomatic Rust improvements with no behavioral changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@panbanda panbanda merged commit b5b6b51 into main Jan 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants