Skip to content

Refactor out excessive borrowed value optimizations in macros#1610

Merged
leighmcculloch merged 1 commit intomainfrom
less-ref
Oct 31, 2025
Merged

Refactor out excessive borrowed value optimizations in macros#1610
leighmcculloch merged 1 commit intomainfrom
less-ref

Conversation

@leighmcculloch
Copy link
Copy Markdown
Member

What

Replace borrowed references with owned values in impl_pub_methods and Fn, which are internal functions and types in the soroban-sdk-macros.

Why

The excessive use of borrowed references and lifetime annotations was adding unnecessary complexity without meaningful performance benefits in macro expansion code that runs at compile time. Several times when I've worked with this code I have found it harder to evolve because of the limitation on data having to be owned externally to these functions.

@leighmcculloch leighmcculloch requested a review from a team October 31, 2025 04:13
@leighmcculloch leighmcculloch marked this pull request as ready for review October 31, 2025 04:45
@leighmcculloch leighmcculloch added this pull request to the merge queue Oct 31, 2025
Merged via the queue into main with commit 0738452 Oct 31, 2025
88 checks passed
@leighmcculloch leighmcculloch deleted the less-ref branch October 31, 2025 07:01
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