use std::vec;
pub struct Container<'a> {
- reader: &'a mut Read
+ reader: &'a mut dyn Read
}
impl<'a> Container<'a> {
- pub fn wrap<'s>(reader: &'s mut io::Read) -> Container<'s> {
+ pub fn wrap<'s>(reader: &'s mut dyn io::Read) -> Container<'s> {
Container { reader: reader }
}
pub fn for_stdin<'a>() -> Container<'a> {
let mut r = io::stdin();
- Container::wrap(&mut r as &mut io::Read)
+ Container::wrap(&mut r as &mut dyn io::Read)
}
fn main() {