-
Notifications
You must be signed in to change notification settings - Fork 30
Comparing changes
Open a pull request
base repository: dfinity/stable-structures
base: v0.6.0-beta.1
head repository: dfinity/stable-structures
compare: v0.6.0-beta.2
- 11 commits
- 12 files changed
- 4 contributors
Commits on Sep 21, 2023
-
feat: Improve Error Handling by Adding Display Implementations (#140)
This pull request aims to improve the error-handling mechanism of the codebase by providing more descriptive error messages. It involves changes across multiple files (`cell.rs`, `log.rs`) to add implementations for the `fmt::Display` trait for `InitError`. #### Key Changes: 1. **Consistent Formatting**: Replaced `std::fmt` with `fmt` to maintain consistency in the code. - File: `btreemap.rs` 2. **Enhanced Error Messages for `InitError` in `cell.rs`**: - Describes errors related to incompatible versions and value sizes. 3. **Detailed Error Messages for `InitError` in `log.rs`**: - Explains issues with incompatible data and index versions, as well as invalid indices. #### Why this is important: Better error messages enhance the debugging experience and allow developers to understand the issues quickly, thereby saving time and effort. #### Files Changed: - `src/btreemap.rs` - `src/cell.rs` - `src/log.rs` #### Types of changes: - [x] Bugfix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation Update (if none of the other choices apply) Co-authored-by: Islam El-Ashi <islam.elashi@dfinity.org>
Configuration menu - View commit details
-
Copy full SHA for 0375df2 - Browse repository at this point
Copy the full SHA 0375df2View commit details
Commits on Sep 22, 2023
-
feat: Enhance Bound Enum with Utility Methods and Refactor Storable T…
…rait (#142) ### Description: This PR introduces utility methods to the `Bound` enum, enhancing its functionality and usability. These methods are used to refactor the `Storable` trait, making it cleaner and more maintainable. #### Use-Case: I am developing a library aimed at simplifying the use of stable memory structures. For example, consider a `TaskTimerEntry` struct defined as: ```rust pub struct TaskTimerEntry<T> { pub time: NanoTimeStamp, pub task: T, } ``` To make this struct bounded, I can now easily specify: ```rust const BOUND: Bound = Bound::Bounded { is_fixed_size: false, max_size: 8 + T::BOUND.max_size(), }; ``` #### Key Changes: Introduced `max_size` and `is_fixed_size` methods to `Bound` enum. #### Impact on `Storable` Trait: The utility methods have been integrated into the `Storable` trait, enhancing its readability and maintainability without altering its core functionality. #### Types of Changes: - [x] New feature (non-breaking change which adds functionality) - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation Update (if none of the other choices apply)
Configuration menu - View commit details
-
Copy full SHA for 4f7c8cb - Browse repository at this point
Copy the full SHA 4f7c8cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for f8a85c3 - Browse repository at this point
Copy the full SHA f8a85c3View commit details -
feat: impl Storable for Option<T: Storable> (#127)
Co-authored-by: Roman Kashitsyn <roman.kashitsyn@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5b51189 - Browse repository at this point
Copy the full SHA 5b51189View commit details
Commits on Sep 25, 2023
-
feat: comprehensive fuzzing for BTreeMap (#143)
Adds a fuzz test that can run indefinitely comparing the results of a stable BTreeMap to a standard BTreeMap. I ended up using `proptest` rather than the conventional `cargo fuzz` for two reasons: 1. `cargo fuzz` requires nightly rust. 2. With proptest, we can have a short version of the fuzz test that runs as part of CI (which is included in this commit).
Configuration menu - View commit details
-
Copy full SHA for 77d2a17 - Browse repository at this point
Copy the full SHA 77d2a17View commit details -
chore: remove redundant utility methods (#144)
#142 introduced some utility methods in the `Bound` struct. We had copies of these utility methods elsewhere, which are no longer needed and are removed in this commit.
Configuration menu - View commit details
-
Copy full SHA for af272e4 - Browse repository at this point
Copy the full SHA af272e4View commit details
Commits on Sep 26, 2023
-
docs: add docs on how to upgrade the schema of stable structures (#146)
Adds a short doc on how attributes can be added to a stable structure. Closes #109
Configuration menu - View commit details
-
Copy full SHA for 96ce8ab - Browse repository at this point
Copy the full SHA 96ce8abView commit details
Commits on Oct 2, 2023
-
fix: support for migrating from bounded type to unbounded type. (#148)
We'd like to support developers changing the bounds of their types from bounded to unbounded. There were some changes that needed to be made in this commit in order to make this migration work.
Configuration menu - View commit details
-
Copy full SHA for c880b83 - Browse repository at this point
Copy the full SHA c880b83View commit details -
Configuration menu - View commit details
-
Copy full SHA for d422c2f - Browse repository at this point
Copy the full SHA d422c2fView commit details
Commits on Oct 5, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 16413ff - Browse repository at this point
Copy the full SHA 16413ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce317fb - Browse repository at this point
Copy the full SHA ce317fbView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v0.6.0-beta.1...v0.6.0-beta.2