Skip to content

rust: Align remaining Result<_, String> APIs to PoolError - #173

Merged
johngrantuk merged 1 commit into
rust-fix-6from
rust-fix-cleanup
Aug 12, 2026
Merged

rust: Align remaining Result<_, String> APIs to PoolError#173
johngrantuk merged 1 commit into
rust-fix-6from
rust-fix-cleanup

Conversation

@johngrantuk

Copy link
Copy Markdown
Member

Summary

  • Convert reCLAMM/v2 swap maths, swap_reclamm_to_price, and buffer wrap/unwrap helpers from Result<_, String> to Result<_, PoolError>
  • Add dedicated variants (ReClammNegativeAmountOut, BufferWrapAmountTooSmall, Erc4626ExceededMaxDeposit/MaxMint) and reuse TokenAmountOutIsGreaterThanBalance where applicable
  • Remove From<String> / From<&str> for PoolError so string errors can no longer silently become Custom
  • Propagate real error variants from reCLAMM on_swap instead of collapsing them to InvalidSwapParameters

@johngrantuk
johngrantuk merged commit 941c539 into rust-fix-6 Aug 12, 2026
3 checks passed
@johngrantuk
johngrantuk deleted the rust-fix-cleanup branch August 12, 2026 08:20
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.

1 participant