]> git.lizzy.rs Git - rust.git/commitdiff
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)
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


Trivial merge