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

Refactoring/renaming fields #106

Open
musjj opened this issue Jan 31, 2025 · 1 comment
Open

Refactoring/renaming fields #106

musjj opened this issue Jan 31, 2025 · 1 comment

Comments

@musjj
Copy link

musjj commented Jan 31, 2025

Renaming fields with Rust Analyzer unfortunately doesn't cause getter/setter methods to be renamed, due to the nature of the macro. Any tips for refactoring?

@jason-hchsieh
Copy link
Contributor

Due to inherent limitations in Rust-style macros, precise renaming isn’t possible. I usually work around this by either using a search-and-replace tool (like sed or an IDE's regex feature) or by creating a dummy function and renaming that.

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

No branches or pull requests

2 participants