Last active
December 2, 2015 07:08
-
-
Save gyng/c195aac3c25815c4b473 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
E:\Projects\ireul [(e8b3637...) +2 ~3 -0 !]> cargo test | |
Compiling ireul v0.0.1 (file:///E:/Projects/ireul) | |
src/core\queue.rs:126:13: 126:18 error: cannot move out of borrowed content [E0507] | |
src/core\queue.rs:126 track.comments.unwrap().comments.iter().filter_map(|comment| | |
^~~~~ | |
error: aborting due to previous error | |
Could not compile `ireul`. |
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
pub fn get_queue_by_fields(&mut self, fields: &Vec<String>) -> Vec<Vec<(String, String)>> { | |
self.items.iter().map(|track| { | |
track.comments.unwrap().comments.iter().filter_map(|comment| | |
match fields.binary_search(&comment.0) { | |
Ok(_) => Some(comment.clone()), | |
Err(_) => None | |
} | |
).collect() | |
}).collect() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment