Skip to content

Commit

Permalink
Implement Stream automatically for Reader + Writer
Browse files Browse the repository at this point in the history
This is consistent with the existing documentation but was not the
actual behaviour, which I've found to be rather a nuisance, actually.
  • Loading branch information
chris-morgan committed Sep 5, 2013
1 parent b161e09 commit da042ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libstd/rt/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ pub trait Writer {

pub trait Stream: Reader + Writer { }

impl<T: Reader + Writer> Stream for T;

pub enum SeekStyle {
/// Seek from the beginning of the stream
SeekSet,
Expand Down

19 comments on commit da042ce

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at chris-morgan@da042ce

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chris-morgan/rust/auto-stream-impl = da042ce into auto

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris-morgan/rust/auto-stream-impl = da042ce merged ok, testing candidate = 13611d06

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

@chris-morgan
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks like spurious failure to me.

The end part of the log for the BSD buildbot, which failed in tests:

test unstable::atomics::test::bool_and ... ok
test unstable::atomics::test::flag ... ok
task <unnamed> failed at 'Successfully opened the empty library.', /home/rustbuild/src/rust-buildbot/slave/auto-bsd-64-opt/build/src/libstd/unstable/dynamic_lib.rs:130
task <unnamed> failed at 'Invalid shared object handle 0', /home/rustbuild/src/rust-buildbot/slave/auto-bsd-64-opt/build/src/libstd/unstable/dynamic_lib.rs:36


The ocean ate the last of the land and poured into the smoking gulf, thereby
giving up all it had ever conquered. From the new-flooded lands it flowed
again, uncovering death and decay; and from its ancient and immemorial bed it
trickled loathsomely, uncovering nighted secrets of the years when Time was
young and the gods unborn. Above the waves rose weedy remembered spires. The
moon laid pale lilies of light on dead London, and Paris stood up from its damp
grave to be sanctified with star-dust. Then rose spires and monoliths that were
weedy but not remembered; terrible spires and monoliths of lands that men never
knew were lands...

fatal runtime error: unwinding again
Abort trap (core dumped)
gmake: *** [tmp/check-stage2-T-x86_64-unknown-freebsd-H-x86_64-unknown-freebsd-std.ok] Error 134
program finished with exit code 2

@huonw
Copy link
Member

@huonw huonw commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already in the retry queue. :)

chris-morgan@da042ce#commitcomment-4020858

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at chris-morgan@da042ce

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chris-morgan/rust/auto-stream-impl = da042ce into auto

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris-morgan/rust/auto-stream-impl = da042ce merged ok, testing candidate = 301cceed

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at chris-morgan@da042ce

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chris-morgan/rust/auto-stream-impl = da042ce into auto

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris-morgan/rust/auto-stream-impl = da042ce merged ok, testing candidate = 4c62b526

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at chris-morgan@da042ce

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging chris-morgan/rust/auto-stream-impl = da042ce into auto

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris-morgan/rust/auto-stream-impl = da042ce merged ok, testing candidate = d84a7b5

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

@bors
Copy link
Contributor

@bors bors commented on da042ce Sep 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = d84a7b5

Please sign in to comment.