Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Sep 2, 2022
1 parent 84e0c75 commit 4e350c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/postings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pub mod tests {
let mut schema_builder = Schema::builder();
let text_field = schema_builder.add_text_field("text", TEXT);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema.clone());
let index = Index::create_in_ram(schema);
let segment = index.new_segment();

{
Expand Down
11 changes: 4 additions & 7 deletions src/snippet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,13 +639,10 @@ Survey in 2016, 2017, and 2018."#;
#[test]
fn test_collapse_overlapped_ranges() {
assert_eq!(&collapse_overlapped_ranges(&[0..1, 2..3,]), &[0..1, 2..3]);
assert_eq!(
collapse_overlapped_ranges(&vec![0..1, 1..2,]),
vec![0..1, 1..2]
);
assert_eq!(collapse_overlapped_ranges(&[0..2, 1..2,]), vec![0..2]);
assert_eq!(collapse_overlapped_ranges(&[0..2, 1..3,]), vec![0..3]);
assert_eq!(collapse_overlapped_ranges(&[0..3, 1..2,]), vec![0..3]);
assert_eq!(&collapse_overlapped_ranges(&[0..1, 1..2,]), &[0..1, 1..2]);
assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..2,]), &[0..2]);
assert_eq!(&collapse_overlapped_ranges(&[0..2, 1..3,]), &[0..3]);
assert_eq!(&collapse_overlapped_ranges(&[0..3, 1..2,]), &[0..3]);
}

#[test]
Expand Down

0 comments on commit 4e350c5

Please sign in to comment.