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

chore(server): Remove import sleep and pending function #2234

Merged

Conversation

tottoto
Copy link
Collaborator

@tottoto tottoto commented Mar 25, 2025

Removes import sleep and pending function.

@tottoto tottoto requested a review from LucioFranco March 25, 2025 13:36
@LucioFranco
Copy link
Member

This just seems like a style change and maybe we don't need this? Not sure what the exact motivation is here.

@tottoto
Copy link
Collaborator Author

tottoto commented Mar 25, 2025

@LucioFranco The motivation is refactoring. In general, importing functions directly is avoided as it reduces readability. In particular, in this case there is a sleep variable in the file, and since these used only once in this file, having the full path to it in the place where it is used improves readability.

@LucioFranco
Copy link
Member

@tottoto that makes sense, would be good to include a short version of those motivations in the future for things like this. 😄

@tottoto
Copy link
Collaborator Author

tottoto commented Mar 25, 2025

@LucioFranco I think this motivation is sufficiently obvious, but it is possible you want some explanation as this case. It is very difficult to decide what should be explained in advance. I think it would be good if that could be clarified during the discussion in each case. I think it is good to ask it when having some question.

@tottoto tottoto added this pull request to the merge queue Mar 25, 2025
Merged via the queue into hyperium:master with commit 29fcc7f Mar 25, 2025
18 checks passed
@tottoto tottoto deleted the remove-import-sleep-and-pending-function branch March 25, 2025 16:53
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.

None yet

2 participants