rust: Make io::Read a generic again

No reason to do virtual dispatch here.

Closes: #1585
Approved by: jlebon
This commit is contained in:
Colin Walters 2018-09-26 14:42:51 +00:00 committed by Atomic Bot
parent 426e16ee8b
commit 1cf8283904

View File

@ -43,9 +43,9 @@ enum InputFormat {
}
/// Parse a YAML treefile definition using architecture `arch`.
fn treefile_parse_stream(
fn treefile_parse_stream<R: io::Read>(
fmt: InputFormat,
input: &mut io::Read,
input: &mut R,
arch: Option<&str>,
) -> io::Result<TreeComposeConfig> {
let mut treefile: TreeComposeConfig = match fmt {