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

Feature: Remove need of use get_size::GetSize for #[derive(get_size::GetSize)] #3

Merged
merged 1 commit into from
Sep 14, 2024

Commits on Sep 13, 2024

  1. Feature: Remove need of use get_size::GetSize for #[derive(get_size::…

    …GetSize)]
    
    This commit enhances the user experience by eliminating the need for
    explicit import statements when using `#[derive(get_size::GetSize)]`.
    Previously, the use of this derive required an accompanying
    `use get_size::GetSize;` statement, without which the compiler would
    raise a not-found trait error.
    
    - **Automatic Trait Reference:**
      - The derived code now references the `GetSize` trait using the full
        path `::get_size::GetSize`. This change ensures that the trait is
        recognized by the compiler without requiring an explicit import
        statement by the user.
    
    - **Use Case for Protobuf:**
      - This update is particularly beneficial in scenarios like adding
        derives to protobuf-generated code, where manually importing traits
        can be challenging or impossible.
    
    This commit simplifies the development process by streamlining the use
    of the `GetSize` derive and improving compatibility with generated code
    bases.
    
    Co-Authored-By: 张炎泼 <drdr.xp@gmail.com>
    bircni and drmingdrmer committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    9aa8239 View commit details
    Browse the repository at this point in the history