aboutsummaryrefslogtreecommitdiff
path: root/src/format/energymech.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/energymech.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/energymech.rs')
-rw-r--r--src/format/energymech.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/format/energymech.rs b/src/format/energymech.rs
index df48318..5965dfa 100644
--- a/src/format/energymech.rs
+++ b/src/format/energymech.rs
@@ -28,13 +28,13 @@ pub struct Energymech;
static TIME_FORMAT: &'static str = "%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(context: &Context, time: &str) -> Time {
@@ -153,14 +153,13 @@ impl<'a, R: 'a> Iterator for Iter<'a, R> where R: BufRead {
}
}
-impl<'a, R: 'a> Decode<'a, R> for Energymech where R: BufRead {
- type Output = Iter<'a, R>;
- fn decode(&'a mut self, context: &'a Context, input: R) -> Iter<R> {
- Iter {
+impl<'a> Decode<'a> for Energymech {
+ 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()
- }
+ })
}
}