-
Notifications
You must be signed in to change notification settings - Fork 4
docs: Document the fixed module
#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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 low-level APIs
… for improved clarity and correctness; update tests accordingly.
…unaligned access test
…port and comprehensive tests for iterator functionality
… safety checks and integration tests
- 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.
…xtension and corresponding tests
…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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds comprehensive documentation to the
fixedmodule and its submodules, including examples and inline comments. It also fixes a bug in thereservemethod.