Skip to content

Conversation

@zensh
Copy link
Contributor

@zensh zensh commented Jun 14, 2024

Implement From for ByteArray, ByteBuf and Bytes.
Implement Default for ByteArray.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/bytebuf.rs Outdated
Comment on lines 134 to 136
impl<T> From<T> for ByteBuf
where
T: Into<Vec<u8>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This impl looks too general to me. For example, this would block us from adding impl From<ByteBuf> for Vec<u8>.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I made some adjustments.

@zensh
Copy link
Contributor Author

zensh commented Jun 18, 2024

Hey, @dtolnay, any other suggestions?

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dtolnay dtolnay merged commit dde7c9e into serde-rs:master Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants