diff options
author | Till Höppner | 2016-01-13 13:32:46 +0100 |
---|---|---|
committer | Till Höppner | 2016-01-20 20:20:32 +0100 |
commit | 8e2f17b9838d60214f007c8108ee7069c458f40d (patch) | |
tree | 7fff0100a7e24f2149fb395abd8af3d869326040 /src/format/weechat3.rs | |
parent | 25b2ed76faf6d55455dec3b90096faa01816f52d (diff) | |
download | ilc-8e2f17b9838d60214f007c8108ee7069c458f40d.tar.gz ilc-8e2f17b9838d60214f007c8108ee7069c458f40d.tar.xz ilc-8e2f17b9838d60214f007c8108ee7069c458f40d.zip |
Updated dependencies, still doesn't build
Diffstat (limited to 'src/format/weechat3.rs')
-rw-r--r-- | src/format/weechat3.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/format/weechat3.rs b/src/format/weechat3.rs index e733a38..118bd3b 100644 --- a/src/format/weechat3.rs +++ b/src/format/weechat3.rs @@ -26,13 +26,13 @@ pub struct Weechat3; static TIME_DATE_FORMAT: &'static str = "%Y-%m-%d %H:%M:%S"; -pub struct Iter<'a, R: 'a> where R: BufRead { +pub struct Iter<'a> { context: &'a Context, - input: R, + input: &'a mut BufRead, buffer: Vec<u8> } -impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { +impl<'a> Iterator for Iter<'a> { type Item = ::Result<Event<'a>>; fn next(&mut self) -> Option<::Result<Event<'a>>> { fn parse_time(c: &Context, date: &str, time: &str) -> Time { @@ -139,14 +139,13 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead { } } -impl<'a, I: 'a> Decode<'a, I> for Weechat3 where I: BufRead { - type Output = Iter<'a, I>; - fn decode(&'a mut self, context: &'a Context, input: I) -> Iter<'a, I> { - Iter { +impl<'a> Decode<'a> for Weechat3 { + fn decode(&'a mut self, context: &'a Context, input: &'a mut BufRead) -> Box<Iterator<Item = ::Result<Event<'a>>> + 'a> { + Box::new(Iter { context: context, input: input, buffer: Vec::new() - } + }) } } |