Last active
August 29, 2015 14:09
-
-
Save ihodes/de5de08abb2ecc1bd35f 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
./src/main.rs:58:13: 58:107 error: cannot infer an appropriate lifetime for lifetime parameter 'r in function call due to conflicting requirements | |
./src/main.rs:58 filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
./src/main.rs:58:33: 58:105 note: first, the lifetime cannot outlive the expression at 58:32... | |
./src/main.rs:58 filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
./src/main.rs:58:33: 58:105 note: ...so type `|&core::result::Result<collections::string::String, std::io::IoError>| -> bool` of expression is valid during the expression | |
./src/main.rs:58 filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
./src/mpain.rs:57:21: 59:10 note: but, the lifetime must be valid for the expression at 57:20... | |
./src/main.rs:57 Some(bf) => { | |
./src/main.rs:58 filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
./src/main.rs:59 } | |
./src/main.rs:57:21: 59:10 note: ...so type `core::iter::SkipWhile<'_, core::result::Result<collections::string::String, std::io::IoError>, core::iter::SkipWhile<'_, core::result::Result<collections::string::String, std::io::IoError>, std::io::Lines<'_, std::io::buffered::BufferedReader<core::result::Result<std::io::fs::File, std::io::IoError>>>>>` of expression is valid during the expression | |
./src/main.rs:57 Some(bf) => { | |
./src/main.rs:58 filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
./src/main.rs:59 } |
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 filtered = match bit_field { | |
None => { filtered.skip_while(|_| false ) }, | |
Some(bf) => { | |
filtered.skip_while(|l| from_str::<uint>(l.clone().unwrap().as_slice()).unwrap() | bf == 1u ) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment