Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,10 @@ impl Seek for File {
}

#[stable(feature = "io_traits_arc", since = "1.73.0")]
impl Read for Arc<File> {
impl<T: ?Sized> Read for Arc<T>
where
for<'a> &'a T: Read,
{
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
(&**self).read(buf)
}
Expand All @@ -974,7 +977,10 @@ impl Read for Arc<File> {
}
}
#[stable(feature = "io_traits_arc", since = "1.73.0")]
impl Write for Arc<File> {
impl<T: ?Sized> Write for Arc<T>
where
for<'a> &'a T: Write,
{
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
(&**self).write(buf)
}
Expand All @@ -991,7 +997,10 @@ impl Write for Arc<File> {
}
}
#[stable(feature = "io_traits_arc", since = "1.73.0")]
impl Seek for Arc<File> {
impl<T: ?Sized> Seek for Arc<T>
where
for<'a> &'a T: Seek,
{
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
(&**self).seek(pos)
}
Expand Down