-
Notifications
You must be signed in to change notification settings - Fork 109
refactor!: migrate Snapshot::try_new_from into SnapshotBuilder #1289
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
refactor!: migrate Snapshot::try_new_from into SnapshotBuilder #1289
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1289 +/- ##
==========================================
- Coverage 83.98% 83.96% -0.02%
==========================================
Files 111 111
Lines 26175 26207 +32
Branches 26175 26207 +32
==========================================
+ Hits 21983 22005 +22
- Misses 3098 3104 +6
- Partials 1094 1098 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally looks good, but will wait for the rename to stamp
0d90bec
to
621ae16
Compare
621ae16
to
d98b3e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
d98b3e9
to
713f748
Compare
…-io#1289) > [!IMPORTANT] > This PR is split into two commits: (1) material changes, and (2) callsite updates This PR integrates `Snapshot::try_new_from` into `SnapshotBuilder`. We move `Snapshot::try_new_from` into `Snapshot::builder_from` and modify `SnapshotBuilder` to return an `Arc<Snapshot>` instead of a `Snapshot`. Also, `Snapshot::builder(table_root)` is renamed to `Snapshot::builder_for(table_root)` 1. Replaces `Snapshot::try_new_from(existing)` with `Snapshot::build_from(existing).build()` 2. `SnapshotBuilder::build()` now returns an `Arc<Snapshot>` instead of a `Snapshot` 3. Renames `Snapshot::builder` to `Snapshot::builder_for` refactor, updated tests
Important
This PR is split into two commits: (1) material changes, and (2) callsite updates
What changes are proposed in this pull request?
This PR integrates
Snapshot::try_new_from
intoSnapshotBuilder
. We moveSnapshot::try_new_from
intoSnapshot::builder_from
and modifySnapshotBuilder
to return anArc<Snapshot>
instead of aSnapshot
.Also,
Snapshot::builder(table_root)
is renamed toSnapshot::builder_for(table_root)
This PR affects the following public APIs
Snapshot::try_new_from(existing)
withSnapshot::build_from(existing).build()
SnapshotBuilder::build()
now returns anArc<Snapshot>
instead of aSnapshot
Snapshot::builder
toSnapshot::builder_for
How was this change tested?
refactor, updated tests