diff options
author | Till Hoeppner | 2015-07-26 23:56:52 +0200 |
---|---|---|
committer | Till Hoeppner | 2015-07-26 23:56:52 +0200 |
commit | 4914e6a56547dcbe0fdbcfd7eae62a3d416875a5 (patch) | |
tree | 3cf2fd6e9b0b0376a23a0ddb32c4242d6a6fec9b /src/format | |
parent | 6a817022a7301d89a2d93be400294f78b5dae0b4 (diff) | |
download | ilc-4914e6a56547dcbe0fdbcfd7eae62a3d416875a5.tar.gz ilc-4914e6a56547dcbe0fdbcfd7eae62a3d416875a5.tar.xz ilc-4914e6a56547dcbe0fdbcfd7eae62a3d416875a5.zip |
Add glob-ing for input files
Diffstat (limited to 'src/format')
-rw-r--r-- | src/format/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/format/mod.rs b/src/format/mod.rs index cd849d5..558de90 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -48,7 +48,7 @@ impl<'a, T, I: BufRead> DecodeBox<'a, I> for T where T: Decode<'a, I> { } } -pub fn decoder(format: &str) -> Option<Box<DecodeBox<&mut BufRead>>> { +pub fn decoder<'a>(format: &str) -> Option<Box<DecodeBox<'a, &'a mut BufRead>>> { match format { "energymech" => Some(Box::new(energymech::Energymech)), "weechat3" => Some(Box::new(weechat3::Weechat3)), @@ -57,7 +57,7 @@ pub fn decoder(format: &str) -> Option<Box<DecodeBox<&mut BufRead>>> { } } -pub fn encoder(format: &str) -> Option<Box<Encode<&mut Write>>> { +pub fn encoder<'a>(format: &str) -> Option<Box<Encode<'a, &'a mut Write>>> { match format { "energymech" => Some(Box::new(energymech::Energymech)), "weechat3" => Some(Box::new(weechat3::Weechat3)), |