]> git.lizzy.rs Git - rust.git/commit
auto merge of #12230 : DaGenix/rust/io-decorator-changes, r=sfackler
authorbors <bors@rust-lang.org>
Sat, 15 Feb 2014 07:46:29 +0000 (23:46 -0800)
committerbors <bors@rust-lang.org>
Sat, 15 Feb 2014 07:46:29 +0000 (23:46 -0800)
commitc9f13b47febb81ef339a15adf0f6ad7a2265c46d
treee8f17e3a7706075264090d1af31d1f8a741c2a4d
parent3496e93d13590140242f862c905dc2d591d2e2ea
parent4c233d1c73edae4fb2609100528d3c952723453f
auto merge of #12230 : DaGenix/rust/io-decorator-changes, r=sfackler

I created RefReader and RefWriter structs that wrap a mutable reference to a Reader or Writer value. This works exactly like the ByRef struct in the iter module and allows passing a reference to a Reader or Writer to function expecting a Reader or Writer by value with the caller retaining ownership to the original value.

I also modified LimitReader to take the wrapped Reader by value instead of by reference.

@sfackler