Last active
August 29, 2015 14:20
-
-
Save tbillington/9a33f8ea44d8a243688d to your computer and use it in GitHub Desktop.
Rust unpacking
This file contains hidden or 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 r2: Result<((String, (Vec<&str>, Vec<char>)), &str), ParseError> = heading.parse("** r&wr"); | |
println!("{:?}", r2); | |
let ((r3, (_, _)), _, _) = r2; | |
println!("{:?}", r3); | |
src/main.rs:50:9: 50:29 error: mismatched types: | |
expected `core::result::Result<((collections::string::String, (collections::vec::Vec<&str>, collections::vec::Vec<char>)), &str), parser_combinators::primitives::ParseError>`, | |
found `(_, _, _)` | |
(expected enum `core::result::Result`, | |
found tuple) [E0308] | |
src/main.rs:50 let ((r3, (_, _)), _, _) = r2;//.clone().map(|x| r2.ok().unwrap()); | |
^~~~~~~~~~~~~~~~~~~~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment