-
Notifications
You must be signed in to change notification settings - Fork 160
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: remvoe Copy
bound from NodeId
#1255
Conversation
740010d
to
ed3b446
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.
Sorry for reviewing this PR on GitHub, reviewable does not show line numbers, which makes me impossible to locate the code and do a check in my IDE, left some comments.
BTW, there are multiple "unused" warnings reported by GitHub Actions on the review page, are they false-positive? If not, perhaps we can do a clean-up:)
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.
@SteveLauC (no review from my side, just a tip)
reviewable does not show line numbers, which makes me impossible to locate the code and do a check in my IDE, left some comments
Actually, it does. It is just a bit cumbersome, since you have to set it up, see here. Similarly, for locating the code in the IDE, you can directly jump into the IDE from Reviewable from any comment (also from a new draft). It is documented here. With that, you don't even strictly need line numbers (BTW, those are shown in the draft of the new comment as well), but I personally did configure them for myself :-).
Reviewable status: 0 of 57 files reviewed, 4 unresolved discussions (waiting on @drmingdrmer and @SteveLauC)
Amazing! TIL! Will set them up. 😄 |
The `NodeId` type is currently defined as: ```rust type NodeId: .. + Copy + .. + 'static; ``` This commit removes the `Copy` bound from `NodeId`. This modification will allow the use of non-`Copy` types as `NodeId`, providing greater flexibility for applications that prefer variable-length strings or other non-`Copy` types for node identification. This change maintain compatibility by updating derived `Copy` implementations with manual implementations: ```rust // Before #[derive(Copy...)] pub struct LogId<NID: NodeId> {} // After impl<NID: Copy> Copy for LogId<NID> {} ``` - Fix: databendlabs#1250
ed3b446
to
61c074e
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.
Reviewable status: 0 of 57 files reviewed, 4 unresolved discussions (waiting on @drmingdrmer)
@SteveLauC @schreter Unfortunately, I haven't figured out how to open CLion directly from Reviewable yet. My browser can open VS Code using the I've learned that I need to manually register a URL handler for CLion. I'll try to set this up later. It's a bit disappointing that it's not as straightforward as with VS Code. :( |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
Refactor: remvoe
Copy
bound fromNodeId
The
NodeId
type is currently defined as:This commit removes the
Copy
bound fromNodeId
.This modification will allow the use of non-
Copy
types asNodeId
,providing greater flexibility for applications that prefer
variable-length strings or other non-
Copy
types for nodeidentification.
This change maintain compatibility by updating derived
Copy
implementations with manual implementations:
Copy
Bound fromNodeId
#1250This change is