We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e891a49 commit 349533fCopy full SHA for 349533f
src/engine/andor.rs
@@ -72,7 +72,12 @@ impl AndEngine {
72
73
fn merge_matched_items(&self, items: Vec<MatchResult>, text: &str) -> MatchResult {
74
let mut ranges = MatchIndices::new();
75
- let mut rank = items[0].rank;
+ let mut rank = crate::Rank {
76
+ score: 0,
77
+ begin: i32::MAX,
78
+ end: i32::MIN,
79
+ ..items[0].rank
80
+ };
81
for item in items {
82
match item.matched_range {
83
MatchRange::ByteRange(..) => {
src/lib.rs
@@ -312,7 +312,7 @@ pub struct Rank {
312
}
313
314
/// Result of matching a query against an item
315
-#[derive(Clone)]
+#[derive(Clone, Debug)]
316
pub struct MatchResult {
317
/// The rank/score of this match
318
pub rank: Rank,
0 commit comments