-
Notifications
You must be signed in to change notification settings - Fork 15
Upgrade dependencies #22
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
base: main
Are you sure you want to change the base?
Conversation
R: AsyncBufRead + Unpin + Sized, | ||
R: AsyncBufRead + Sized, |
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.
I removed Unpin
but I'm not sure if this is correct.
Does reader: R
actually need to implement Unpin
...?
My understanding of pinning is quite limited :(
Poll::Ready(Some(Ok(mem::replace(this.buf, String::new())))) | ||
Poll::Ready(Some(Ok(std::mem::take(this.buf)))) |
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.
std::mem::take
is just more concise and idiomatic (clippy suggested this change):
since String
implements Default
as an empty string, mem::take
should replace this.buf
with an empty string
/// Was the last character of the previous line a \r? | ||
/// Bytes that were fed to the decoder but do not yet form a message. | ||
buffer: Vec<u8>, |
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.
I didn't find any usage of this buffer
field
Hi Yoshua,
Thank you for maintaining this crate!
In this PR I tried to carefully upgrade the dependencies to their latest versions and fix some clippy warnings.
Here is the list of updated crates:
I also had to update a few tests to use
Box::pin
forencoder
, like this:Here is what I mean:
Hopefully this is the right approach...
I split the changes into multiple commits to make the review easier.
Please let me know if anything needs improvement — I’m happy to help.