Replace assignment with return
Convert a variable assignment to a
Inline return converts a variable assignment to a
Such a conversion is possible when the following statement after the assignment in the control flow returns the variable.
This refactoring simplifies the control flow and makes it easier to reason about a function.
- Code Assist ID (for the configuration file):
- You can configure custom keyboard shortcuts with these code action kinds:
- This code assist provides refactoring suggestions. Learn how to configure the refactoring suggestion visibility.