-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev #16
Draft
Trehinos
wants to merge
38
commits into
ci
Choose a base branch
from
dev
base: ci
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
- Added documentation and example usage for the new `Unwrap` trait. - Reformatted existing comments in the `Map` trait for consistency.
Introduced a detailed CHANGELOG.md to document version history, changes, and features from the initial development phase to the current state. This includes information about traits, methods, and structural adjustments over multiple version releases. Changes: - Created a new CHANGELOG.md file. - Documented project milestones from v0.9 (Alpha) to v1.3.1. - Included release highlights, features, and updates for each version.
The arrow type for relationships in the PlantUML diagram was updated from composition ("<--") to inheritance ("<|.."). This reflects a more accurate representation of the relationships in the diagram. Changes made: - Updated `Not`, `LeftOrRight`, `Swap`, `Map`, and `Unwrap` connections to use inheritance arrows `<|..`.
Replaced the deprecated `is_one` function with `is_either` as its replacement, while deprecating the former officially. In the type diagram expanded the `AnyOf` class hierarchy to include specific accessor methods such as `ll`, `lr`, `rl`, `rr`, and their deeper variants for structured querying. Changes: - Added `is_either` method in `src/lib.rs`. - Deprecated `is_one` method with a deprecation notice. - Updated `Swap::Output` type definition in `doc/types.plantuml`. - Expanded `AnyOf4`, `AnyOf8`, and `AnyOf16` classes with structured accessor methods in `doc/types.plantuml`.
This adds a new `conversions` module, enabling ergonomic transformations between `Either`, `Both`, and `AnyOf` types using the `From` trait. Type diagrams in `doc/types.plantuml` were also updated to include new struct members. Changes: - Added the `conversions` module with type conversion implementations. - Exported the `conversions` module in `src/lib.rs`. - Updated `doc/types.plantuml` to reflect new struct member additions.
Fixed diagram connections and clarified relationships between structures like `AnyOf`, `AnyOf4`, `AnyOf8`, and `AnyOf16`. Added support for `BitAnd` and `BitOr` operations within `AnyOf`. Changes: - Corrected `AnyOf` relationships and added `BitAnd`/`BitOr` outputs. - Replaced `AnyOf4`, `AnyOf8`, and `AnyOf16` class definitions with `struct`. - Adjusted inheritance and meta-class definitions linking `Copy`, `Clone`, etc.
This commit introduces separate test modules for `Either`, `Both`, and `AnyOf`, improving test organization. Existing tests for these types were extracted into their respective files: `test_either.rs`, `test_both.rs`, and `test_any_of.rs`. Changes: - Moved `Either` tests to `src/tests/test_either.rs` - Moved `Both` tests to `src/tests/test_both.rs` - Moved `AnyOf` tests to `src/tests/test_any_of.rs` - Updated main `tests.rs` to reference the new test modules instead
Removed redundant nested test modules and added test cases for `AnyOf`. This includes new tests for methods like `from_any`, `into_either`, and `to_either_pair`. Updated README formatting and bumped version to `1.3.3-dev`. - Removed nested `#[cfg(test)] mod tests` across test files. - Added missing tests for `AnyOf` functionality. - Updated README for minor formatting and clarity improvements. - Adjusted Cargo.toml and Cargo.lock for version bump to `1.3.3-dev`. - Updated CHANGELOG with new version and changes.
Replaced verbose `Either::Left`/`Either::Right` references with simplified `Left`/`Right` naming across modules, tests, and examples. Incorporated new shorthand variants `EitherOf`, `BothOf`, and `Neither` where applicable for cleaner syntax. Changes: - Updated all `Either::Left`/`Either::Right` usages to `Left`/`Right`. - Modified `AnyOf` variant representations with `EitherOf`, `BothOf`, and `Neither`. - Adjusted test cases, examples, and documentation to align with new shorthand. - Updated wildcard imports and public exports to include new shorthand types.
Replaced instances of `Either` and `Both` with the new names `EitherOf` and `BothOf` across all relevant files for better naming consistency. This change includes updates in tests, documentation, and method references. **Changes:** - Updated test cases in `test_either.rs` to use `EitherOf` instead of `Either`. - Renamed `Both` to `BothOf` and `Either` to `EitherOf` in `src/lib.rs` and `src/both.rs`. - Modified `README.md` to reflect the updated naming convention. - Refactored associated documentation, examples, and comments across the codebase.
Updated documentation examples to reflect renaming of `Both` to `BothOf` and `Either` to `EitherOf`. This aligns the naming with more descriptive and consistent conventions across the codebase. Changes: - Renamed `Both` references to `BothOf`. - Renamed `Either` references to `EitherOf`. - Updated all corresponding example usages in the documentation.
Added several new `From` trait implementations to facilitate conversions between `Couple`, `Any`, and existing types (`AnyOf`, `BothOf`, `EitherOf`). These changes enhance compatibility among these types and provide more flexible transformation options. Renamed `Both` to `BothOf` and `Either` to `EitherOf`, updating the naming consistency across exported types and cases. Simplified operators: `+` for `combine()`, `-` for `filter()`, and `!` for `swap()`. Removed deprecated methods like `AnyOf::is_one()`. Changes: - `Both` -> `BothOf`, `Either` -> `EitherOf` across types and code. - Operators: `+` -> `combine()`, `-` -> `filter()`, `!` -> `swap()`. - Updated documentation, test cases, and examples for new conventions. - Version bumped to `2.0.0` in `Cargo.toml` and `Cargo.lock`. - Removed deprecated `AnyOf::is_one()` method. - Updated UML in `types.plantuml`. - Updated module documentation comments. - Replaced `Either` with `EitherOf` in examples. - Added `From<Couple<L, R>>` implementations for `AnyOf`, `BothOf`, and `Couple`. - Added `From<Any<L, R>>` implementations for `AnyOf`, `BothOf`, `EitherOf`, and `Any`. - Added `From<EitherOf<L, R>>` implementation for `Any<L, R>`. - Added conversion panic checks for invalid `Any` to `Either` transformations.
…tion The `AnyOf` type definition has been adjusted to replace `Both` with `BothOf` for consistency in naming. Additional context was added about the `Any<T, U>` type as a couple of optional values. Minor corrections were made to clarify function syntax and improve examples.
…Of` in `src/either.rs` in comment references.
Switched the implementation of the `Swap` trait across various types to use the `Not` (`!`) operator. This change integrates the `Swap` trait with `core::ops::Not`, simplifying usage by replacing method calls with a standard operator. Fixed minor doc inconsistencies and adjusted formatting to align with these modifications. ### Changes: - Added `Not` implementation for `Swap` trait in `src/concepts.rs`, `src/either.rs`, `src/both.rs`, and `src/lib.rs`. - Updated `swap` method in relevant types to utilize the `!` operator internally. - Removed duplicate or redundant `Swap` implementations. - Corrected operator references for `Either` (`&` to `+`) and `AnyOf` (`|` to `-`) in `src/lib.rs`. - Fixed minor typos and formatting issues in documentation across modified files.
This commit introduces the implementation of the `Shr` (`>>`) operator for `BothOf`, `AnyOf`, and `EitherOf` types. It allows functional mapping using pairs of transformation functions for both fields or variants. Documentation is updated, and redundant match-based mappings are replaced with the new operator. Changes: - Added `Shr` trait implementation for `BothOf`, `AnyOf`, and `EitherOf`. - Replaced match-based mapping logic with `Shr` operator usage. - Updated `types.plantuml` UML diagrams to reflect the `Shr` addition. - Adjusted imports in relevant modules to include `Shr`.
The diagram was replaced with a new version. This might reflect updated content, better visuals, or corrections. Changes: - Replaced `doc/any_of-type-diagram.png` with a new file.
BothOf and EitherOf now support a default type for the right parameter, reducing the need for explicit type annotations in common cases. Updated related documentation and added clarifying examples to improve understanding of new behavior. Changes: - Added default type parameter `R = L` for `BothOf` and `EitherOf`. - Updated README with adjusted type examples and operator clarifications. - Improved code samples and operator descriptions in `src/lib.rs`. - Adjusted test example output to align with changes. - Fixed and cleaned up the shr method's example. - Modified doc comments for consistency with new behavior.
Updated type conversion implementations for `EitherOf`, `BothOf`, `AnyOf`, and `Couple`, adding detailed documentation and panics for edge cases. Adjusted `shr` function output type and corrected syntax typos in comments and method signatures. Changes: - Updated documentation in `src/conversions.rs` for type conversions and panics handling. - Adjusted `shr` implementation to use `<Self as Map<L, R>>` for its `Output` type. - Fixed minor typos in comments. - Refined examples in type conversion descriptions.
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.
No description provided.