Use the prompt
Include the language version and behavior you need to preserve. A smaller change is easier to review when it has a clear benefit beyond making the code look newer.
Update legacy code to use current language features and best practices. Modernize without breaking functionality.
For GitLab Duo
Modernize this legacy code:
[PASTE CODE]
Update to use:
1. Current language features
2. Modern libraries
3. Best practices
4. Improved error handlingInclude the language version and behavior you need to preserve. A smaller change is easier to review when it has a clear benefit beyond making the code look newer.