Skip to content

Instantly share code, notes, and snippets.

@isaacg1
Created July 6, 2017 05:54
Show Gist options
  • Save isaacg1/775777e89263df18b4a68932b52bbcc0 to your computer and use it in GitHub Desktop.
Save isaacg1/775777e89263df18b4a68932b52bbcc0 to your computer and use it in GitHub Desktop.
Match issue
fn row_to_string(row: &Row) -> String {
// Details unimportant
}
let matches: Vec<(usize, usize)> = self.core
.rows
.iter()
.enumerate()
.flat_map(|(row_index, row)| {
row_to_string(row)
.match_indices(query)
.map(|(char_index, _)| (row_index, char_index))
//.collect::<Vec<(usize, usize)>>()
})
.collect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment