Skip to content

Conversation

@Ayoub-Mabrouk
Copy link
Contributor

Replaced use of arguments in req.acceptsEncodings with the spread syntax (...encodings) to improve readability and reduce code complexity, while maintaining the same functionality.

Replaced use of `arguments` in `req.acceptsEncodings` with the spread syntax (`...encodings`) to improve readability and reduce code complexity, while maintaining the same functionality.
@Abdel-Monaam-Aouini
Copy link
Contributor

already added #6086

@Ayoub-Mabrouk
Copy link
Contributor Author

already added #6086

Hello @Abdel-Monaam-Aouini Thanks for your input on this! I went with a slightly different approach to keep things concise by calling accepts(this).encodings(...encodings) directly, avoiding the intermediate accept variable. This makes the code a bit more streamlined and skips a minor, unnecessary allocation. I thought this might be more consistent with our style, but I’m happy to discuss if you see other benefits to your approach!

Copy link
Member

@wesleytodd wesleytodd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to have a discussion for this one on if we would want to merge without some performance testing. Just adding this block so assess 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

Successfully merging this pull request may close these issues.

3 participants