Skip to content

Commit

Permalink
Perform some of the deepsource suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricHermansBIT committed Feb 15, 2024
1 parent a5f6c82 commit cfefcd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/intervaltree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ impl IntervalTree {
}
let root = self.top_node.as_ref().unwrap();
let mut result = root.search_point(start);
for (&key, _) in self.boundary_table.range(start..end+1) {
for (&key, _) in self.boundary_table.range(start..=end) {
result.extend(root.search_point(key));
}
result
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ fn read_gtf(file_path: &str, feature_type_filter: &str, ref_names_to_id: &HashMa
let file = File::open(file_path).expect("Could not open this file");
let mut reader = BufReader::new(file);
let mut counter = 0;
let mut line = String::new();
let mut line = String::default();
while reader.read_line(&mut line).unwrap() > 0 {
counter += 1;
if counter % 100000 == 0 {
Expand Down
2 changes: 1 addition & 1 deletion src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl Node {
}

// join the vector into a string
let result = result.join("");
let result = result.concat();

if to_string {
vec![result]
Expand Down

0 comments on commit cfefcd4

Please sign in to comment.