-
Notifications
You must be signed in to change notification settings - Fork 2
refactor: replace Box::pin with core::pin::pin!
#52
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
Conversation
Box::pin with `core::pin::pin!Box::pin with core::pin::pin!
MegaRedHand
left a comment
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.
Good work! Left some comments about style.
Peponks9
left a comment
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 for the feedback @MegaRedHand, changes made to align with comments
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.
Pull Request Overview
This PR refactors the time.rs file to replace Box::pin with core::pin::pin! macro for stack-pinning futures, which improves performance by avoiding heap allocation while maintaining the same functionality.
- Replaced all
Box::pincalls withcore::pin::pin!macro - Added explicit let bindings for pinned futures to resolve compilation issues with temporary borrowing
- Simplified nested async block structures for better readability
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
1632451 to
169f76c
Compare
cbd396c to
518d088
Compare
|
Hi @MegaRedHand, all set with signed commits. I had some trouble with signing keys but resolved now. Thanks |
Refactor all instances of
Box::pinwithcore::pin::pin!in thetime.rsfile. The changes ensure stack-pinning of futures for better performance while maintaining the same functionality.Changes Made
Files Changed
time.rsTesting
cargo check.cargo teststill passing.Closes #50
cc @MegaRedHand