-
Notifications
You must be signed in to change notification settings - Fork 950
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
Deal with some clippy warnings #2139
Conversation
LocalStreamId is already a u64, no need to convert.
This creates the vector with the appropriate capacity.
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.
Thank you @thomaseizinger!
I purposely left everything in relay untouched to not interfere with #2059 too much.
Very considerate. Thank you.
@@ -244,25 +244,25 @@ impl Encoder for Codec { | |||
fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> { | |||
let (header, data) = match item { | |||
Frame::Open { stream_id } => { | |||
(u64::from(stream_id.num) << 3, Bytes::new()) | |||
(stream_id.num << 3, Bytes::new()) |
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! I should have caught this in #2094.
As an aside: I would as well be fine failing CI on clippy warning level lints. |
I would like that! If we do that now, it will interfere with your relay changes though. Let me know if that is okay for you. |
That would be fine by me. Me being slow at tackling #2052 should not slow down all of you. |
I opened #2148. |
Can drop individual commits if some of the changes are not wanted.
I purposely left everything in
relay
untouched to not interfere with #2059 too much.