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)] #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drmingdrmer
Copy link

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.

…e::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.
@bircni
Copy link

bircni commented Sep 13, 2024

@drmingdrmer Ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants