diff --git a/Cargo.lock b/Cargo.lock index 694d654d..3824db8b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10707,7 +10707,7 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "std-shims" -version = "0.1.4" +version = "0.1.5" dependencies = [ "hashbrown 0.16.0", "rustversion", diff --git a/common/std-shims/Cargo.toml b/common/std-shims/Cargo.toml index 9ca7adcf..84f22555 100644 --- a/common/std-shims/Cargo.toml +++ b/common/std-shims/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "std-shims" -version = "0.1.4" +version = "0.1.5" description = "A series of std shims to make alloc more feasible" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/common/std-shims" diff --git a/common/std-shims/src/io.rs b/common/std-shims/src/io.rs index 3f049a46..6ab8436b 100644 --- a/common/std-shims/src/io.rs +++ b/common/std-shims/src/io.rs @@ -64,6 +64,12 @@ mod shims { } } + impl Read for &mut R { + fn read(&mut self, buf: &mut [u8]) -> Result { + R::read(*self, buf) + } + } + pub trait BufRead: Read { fn fill_buf(&mut self) -> Result<&[u8]>; fn consume(&mut self, amt: usize);