Skip to content

Commit

Permalink
Fix off by one error from 0befe8d (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
egrieco authored Dec 24, 2024
1 parent 8c35953 commit 62e9d27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion skim/src/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl RankBuilder {

/// score: the greater the better
pub fn build_rank(&self, score: i32, begin: usize, end: usize, length: usize, index: usize) -> Rank {
let mut rank = [0; 4];
let mut rank = [0; 5];
let begin = begin as i32;
let end = end as i32;
let length = length as i32;
Expand Down
2 changes: 1 addition & 1 deletion skim/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ pub enum MatchRange {
Chars(Vec<usize>), // individual character indices matched
}

pub type Rank = [i32; 4];
pub type Rank = [i32; 5];

#[derive(Clone)]
pub struct MatchResult {
Expand Down

0 comments on commit 62e9d27

Please sign in to comment.