-
Notifications
You must be signed in to change notification settings - Fork 35
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
Refactor main.rs: Move loop and functions to app module #44
Refactor main.rs: Move loop and functions to app module #44
Conversation
Great work buddy! You did a great refactoring of main routine imo. Let's wait for @grunch review! I think you will be merged soon! |
Hey @cypherchabon Great contribution!!!! we need to start clean things up 😃 I'm trying to review it but I'm having this panick runing it:
And here is a verbose backtrace
|
Fix nested tokio runtime issue by making app::run async and awaiting it in main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks now is working, the only thing left is we are getting a lot of warnings, can you run a cargo clippy
and fix them please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This pull request significantly improves the organization and readability of the codebase by refactoring the main.rs file. Previously, main.rs contained a large number of lines of code, making it difficult to navigate and maintain.
The following changes have been made:
The main.rs file has been streamlined to only include the initial configuration setup, making it easier to understand the purpose of the file.
The main loop responsible for mapping actions to their corresponding functions has been moved to a separate file called app.rs.
Each function associated with a specific action has been moved to its own separate file within the app module. This modular approach makes it easier to manage, maintain, and extend the codebase in the future.
Overall, these changes lead to a more maintainable and easier-to-understand code structure, allowing for more efficient development and collaboration.