Skip to content

Conversation

@reject-i
Copy link
Contributor

Replace as casts with From conversions in fee calculation code.

The as keyword can silently truncate values if types change in the future. Using From trait makes these conversions explicit and type-safe - any incompatible change will fail at compile time instead of causing silent bugs in production fee calculations.

Copy link
Contributor

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

type unlikely to change so doesnt matter here, ty for the idea

@onbjerg onbjerg closed this Nov 19, 2025
@github-project-automation github-project-automation bot moved this to Done in Foundry Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants