Skip to content

Commit ac6c0bd

Browse files
committed
Revert "Fix borsh endianness"
This reverts commit 9f422d0.
1 parent d93565e commit ac6c0bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/borsh_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ where
1010
{
1111
fn deserialize_reader<R: Read>(reader: &mut R) -> io::Result<Self> {
1212
fn deserialize_u32_as_usize<R: Read>(reader: &mut R) -> io::Result<usize> {
13-
let x = u32::from_le(u32::deserialize_reader(reader)?);
13+
let x = u32::deserialize_reader(reader)?;
1414
usize::try_from(x).map_err(io::Error::other)
1515
}
1616

@@ -85,7 +85,7 @@ where
8585
{
8686
fn serialize<W: Write>(&self, writer: &mut W) -> io::Result<()> {
8787
fn serialize_usize_as_u32<W: Write>(x: usize, writer: &mut W) -> io::Result<()> {
88-
let x = u32::try_from(x).map_err(io::Error::other)?.to_le();
88+
let x = u32::try_from(x).map_err(io::Error::other)?;
8989
BorshSerialize::serialize(&x, writer)
9090
}
9191

0 commit comments

Comments
 (0)