Created
January 7, 2019 12:32
-
-
Save pvanheus/c98676d1b83ad804048c2900e517140c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let output_file = match matches.value_of("OUTPUT_FILE") { | |
Some(name) => fasta::Writer::new(File::create(name).expect(format!("Failed to open output file ({})", name).as_str())), | |
None => fasta::Writer::new(io::stdout()) | |
}; | |
// | |
// error[E0308]: match arms have incompatible types | |
// --> src/main.rs:42:23 | |
// | | |
// 42 | let output_file = match matches.value_of("OUTPUT_FILE") { | |
// | _______________________^ | |
// 43 | | Some(name) => fasta::Writer::new(File::create(name).expect(format!("Failed to open output file ({})", name).as_str())), | |
// 44 | | None => fasta::Writer::new(io::stdout()) | |
// | | -------------------------------- match arm with an incompatible type | |
// 45 | | }; | |
// | |_____^ expected struct `std::fs::File`, found struct `std::io::Stdout` | |
// | | |
// = note: expected type `bio::io::fasta::Writer<std::fs::File>` | |
// found type `bio::io::fasta::Writer<std::io::Stdout>` | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment