Skip to content

[Feature] Avoid conflicting functions with common trait impls on UDT types #826

Open
@Will-Smith11

Description

Component

sol-types, sol! macro, syn-solidity

Describe the feature you would like

On UDT types, currently there is a impl that converts to and from the underlying.

                /// Convert from the underlying value type.
                #[inline]
                pub const fn from(value: #underlying_rust) -> Self {
                    Self(value)
                }

                /// Return the underlying value.
                #[inline]
                pub const fn into(self) -> #underlying_rust {
                    self.0
                }

However these functions conflict with regular into and from trait impl's. Currently this will just render them useless (the impl on the struct will always override the trait impls). I recommend changing the naming to, from_underlying and into_underlying

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions