We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
serialize
deserialize_reader
Currently, the required method for BorshDeserialize has the following signature:
BorshDeserialize
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self>;
However, it can be changed to just:
fn deserialize_reader<R: Read>(reader: R) -> Result<Self>;
because Read has a blanket impl for mut references: https://docs.rs/borsh/latest/borsh/io/trait.Read.html#impl-Read-for-%26mut+R
Read
Similarly, BorshSerialize can be changed from
BorshSerialize
fn serialize<W: Write>(&self, writer: &mut W) -> Result<()>;
to
fn serialize<W: Write>(&self, writer: W) -> Result<()>;
because Write has a blanket impl for mut references: https://docs.rs/borsh/latest/borsh/io/trait.Write.html#impl-Write-for-%26mut+W
Write
This will be a breaking change
The text was updated successfully, but these errors were encountered:
wrong repo, sorry. Moved to: near/borsh-rs#270
Sorry, something went wrong.
No branches or pull requests
Currently, the required method for
BorshDeserialize
has the following signature:However, it can be changed to just:
because
Read
has a blanket impl for mut references: https://docs.rs/borsh/latest/borsh/io/trait.Read.html#impl-Read-for-%26mut+RSimilarly,
BorshSerialize
can be changed fromto
because
Write
has a blanket impl for mut references: https://docs.rs/borsh/latest/borsh/io/trait.Write.html#impl-Write-for-%26mut+WThis will be a breaking change
The text was updated successfully, but these errors were encountered: