Skip to content
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

Merged
merged 1 commit into from
Oct 14, 2024

Commits on Oct 14, 2024

  1. Refactor: remvoe Copy bound from NodeId

    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
    drmingdrmer committed Oct 14, 2024
    Configuration menu
    Copy the full SHA
    61c074e View commit details
    Browse the repository at this point in the history