Skip to content

Commit da042ce

Browse files
committed
Implement Stream automatically for Reader + Writer
This is consistent with the existing documentation but was not the actual behaviour, which I've found to be rather a nuisance, actually.
1 parent b161e09 commit da042ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libstd/rt/io/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ pub trait Writer {
451451

452452
pub trait Stream: Reader + Writer { }
453453

454+
impl<T: Reader + Writer> Stream for T;
455+
454456
pub enum SeekStyle {
455457
/// Seek from the beginning of the stream
456458
SeekSet,

0 commit comments

Comments
 (0)