diff --git a/examples/query-database.rs b/examples/query-database.rs index 20c04aca9..e61e2d0ab 100644 --- a/examples/query-database.rs +++ b/examples/query-database.rs @@ -116,7 +116,7 @@ fn main() -> Result<(), Box> { }; print!("{}: ", name); - let areas = create_highlight_areas(&text, doc.matches.as_matches(), attr); + let areas = create_highlight_areas(&text, &doc.matches, attr); display_highlights(&text, &areas)?; println!(); } @@ -125,7 +125,7 @@ fn main() -> Result<(), Box> { } let mut matching_attributes = HashSet::new(); - for _match in doc.matches.as_matches() { + for _match in doc.matches { let attr = SchemaAttr::new(_match.attribute.attribute()); let name = schema.attribute_name(attr); matching_attributes.insert(name); diff --git a/src/rank/mod.rs b/src/rank/mod.rs index 5416ca882..ad91830bf 100644 --- a/src/rank/mod.rs +++ b/src/rank/mod.rs @@ -71,10 +71,6 @@ impl Matches { windows: self.slices.windows(2), } } - - pub fn as_matches(&self) -> &[Match] { - &self.matches - } } pub struct QueryIndexGroups<'a, 'b> {