aboutsummaryrefslogtreecommitdiff
path: root/src/format/weechat3.rs
diff options
context:
space:
mode:
authorTill Höppner2016-01-13 13:32:46 +0100
committerTill Höppner2016-01-20 20:20:32 +0100
commit8e2f17b9838d60214f007c8108ee7069c458f40d (patch)
tree7fff0100a7e24f2149fb395abd8af3d869326040 /src/format/weechat3.rs
parent25b2ed76faf6d55455dec3b90096faa01816f52d (diff)
downloadilc-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.rs15
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()
- }
+ })
}
}