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

Reduce Try/TryFrom implementations for general types #3130

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

squadgazzz
Copy link
Contributor

Description

During some debugging sessions, it was noticed that having implicit conversions overcomplicate code navigations. The proposal is to use explicit from/into_domain functions for general types.

Changes

The PR touches only Auction and FeePolicy structs at the moment. But once bumped into the same issue with any other struct, a follow-up should be opened.

@squadgazzz squadgazzz requested a review from a team as a code owner November 19, 2024 19:54
@m-lord-renkse
Copy link
Contributor

The PR touches only Auction and FeePolicy structs at the moment. But once bumped into the same issue with any other struct, a follow-up should be opened.

Why don't we do it for all in one sitting? 🤔

@squadgazzz
Copy link
Contributor Author

Why don't we do it for all in one sitting? 🤔

The issue is with general structs only. All the internal fields can still use those implicit conversations.

Copy link
Contributor

@mstrug mstrug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok.

@squadgazzz squadgazzz enabled auto-merge (squash) November 21, 2024 09:37
@squadgazzz squadgazzz merged commit 722b1ce into main Nov 21, 2024
10 of 11 checks passed
@squadgazzz squadgazzz deleted the reduce-try-into-implementations branch November 21, 2024 09:49
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants