diff --git a/src/libstd/io/cursor.rs b/src/libstd/io/cursor.rs index a1002fdb645..2d780559db1 100644 --- a/src/libstd/io/cursor.rs +++ b/src/libstd/io/cursor.rs @@ -230,6 +230,7 @@ fn fill_buf(&mut self) -> io::Result<&[u8]> { #[stable(feature = "rust1", since = "1.0.0")] impl<'a> Write for Cursor<&'a mut [u8]> { + #[inline] fn write(&mut self, data: &[u8]) -> io::Result { let pos = cmp::min(self.pos, self.inner.len() as u64); let amt = (&mut self.inner[(pos as usize)..]).write(data)?; @@ -269,6 +270,7 @@ fn flush(&mut self) -> io::Result<()> { Ok(()) } #[stable(feature = "cursor_box_slice", since = "1.5.0")] impl Write for Cursor> { + #[inline] fn write(&mut self, buf: &[u8]) -> io::Result { let pos = cmp::min(self.pos, self.inner.len() as u64); let amt = (&mut self.inner[(pos as usize)..]).write(buf)?;