Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This change adds comprehensive documentation to the fixed module and its submodules, including examples and inline comments. It also fixes a bug in the reserve method.

lukefleed and others added 20 commits August 5, 2025 18:32
…mplementation, and update prelude exports for improved clarity and usability.
- Updated the `Storable` trait to utilize `TryFrom` and `TryInto` for safer conversions.
- Introduced a new `DefaultParams` trait to associate element types with their optimal storage words and endianness.
- Added binary search functionality to the `FixedVec` view, including methods for standard and comparator-based searches.
- Enhanced the `fixed_vec!` macro tests to cover various scenarios, including empty vectors and repeated elements.
- Implemented comprehensive integration tests for `FixedVec`, covering all primitive integer types and edge cases.
- Commented out unused test modules and documentation to streamline the testing process.
…lementations, enhance testing for parallel functionality.
- Added FromIterator implementation for FixedVec, allowing creation from iterators with automatic bit width determination.
- Introduced new methods for capacity management: with_capacity, capacity, word_capacity, reserve, and shrink_to_fit.
- Updated resize method to optimize performance for large extensions and truncations.
- Enhanced tests for FixedVec to cover new functionality, including FromIterator and capacity management.
- Removed outdated test files for FixedVec and SFixedVec integration tests, consolidating tests into more relevant files.
… mutable proxy and chunking functionality

- Deleted old serde implementation for SFixedVec to streamline serialization.
- Removed SFixedVecSlice and related methods to simplify the codebase.
- Introduced new chunking iterators for FixedVec and mutable chunks for enhanced performance.
- Added MutProxy for safe mutable access to FixedVec elements, allowing for read-modify-write operations.
- Updated tests to cover new chunking and proxy functionalities, ensuring correctness and stability.
…ment, and add default implementation; improve modification tests for insert and remove methods.
… for improved clarity and correctness; update tests accordingly.
…port and comprehensive tests for iterator functionality
- Added `swap_remove`, `try_push`, `try_set`, `replace`, and `swap` methods to FixedVec for enhanced element manipulation.
- Introduced error handling in `try_push` and `try_set` to prevent overflow issues.
- Added unit tests for the new methods in FixedVec, including edge cases for out-of-bounds access and value limits.
…tial operations: Implement comprehensive performance tests for FixedVec and sux::BitFieldVec with various bit widths and access patterns.
- Update benchmark measurement time to 2 seconds for efficiency.
- Improve `map_in_place` methods for `LEFixedVec` and `sux::BitFieldVec` with unchecked variants.
- Enhance random vector generation logic for better clarity and performance.
- Add NumCast trait to Word trait for improved type conversions.
- Adjusted bit widths in benchmark tests for better coverage.
- Enhanced iterator safety and performance by refining unchecked access.
- Improved type constraints for FixedVec to ensure static lifetimes.
This commit adds comprehensive documentation to the `fixed` module and its submodules.

The documentation includes:
- Module-level explanations with examples.
- Detailed documentation for all public structs, enums, traits, and functions.
- Examples for all important methods to demonstrate usage.
- Inline comments to clarify non-obvious parts of the implementation.

All documentation follows the provided style guide, maintaining a professional and clear tone.

This commit also includes a fix for a bug in the `reserve` method of `FixedVec` that was discovered while testing the documentation examples.
@lukefleed lukefleed closed this Aug 7, 2025
@lukefleed lukefleed deleted the document-fixed-module branch August 7, 2025 13:17
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