rust: Make io::Read a generic again
No reason to do virtual dispatch here. Closes: #1585 Approved by: jlebon
This commit is contained in:
parent
426e16ee8b
commit
1cf8283904
@ -43,9 +43,9 @@ enum InputFormat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Parse a YAML treefile definition using architecture `arch`.
|
/// Parse a YAML treefile definition using architecture `arch`.
|
||||||
fn treefile_parse_stream(
|
fn treefile_parse_stream<R: io::Read>(
|
||||||
fmt: InputFormat,
|
fmt: InputFormat,
|
||||||
input: &mut io::Read,
|
input: &mut R,
|
||||||
arch: Option<&str>,
|
arch: Option<&str>,
|
||||||
) -> io::Result<TreeComposeConfig> {
|
) -> io::Result<TreeComposeConfig> {
|
||||||
let mut treefile: TreeComposeConfig = match fmt {
|
let mut treefile: TreeComposeConfig = match fmt {
|
||||||
|
Loading…
Reference in New Issue
Block a user