Skip to content

Commit

Permalink
Add type annotations on BBDTree constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Mec-iS committed Apr 6, 2023
1 parent 7c39ace commit af5033b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithm/neighbour/bbd_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ impl BBDTreeNode {

impl BBDTree {
pub fn new<T: Number, M: Array2<T>>(data: &M) -> BBDTree {
let nodes = Vec::new();
let nodes: Vec<BBDTreeNode> = Vec::new();

Check warning on line 43 in src/algorithm/neighbour/bbd_tree.rs

View check run for this annotation

Codecov / codecov/patch

src/algorithm/neighbour/bbd_tree.rs#L43

Added line #L43 was not covered by tests

let (n, _) = data.shape();

let index = (0..n).collect::<Vec<_>>();
let index = (0..n).collect::<Vec<usize>>();

Check warning on line 47 in src/algorithm/neighbour/bbd_tree.rs

View check run for this annotation

Codecov / codecov/patch

src/algorithm/neighbour/bbd_tree.rs#L47

Added line #L47 was not covered by tests

let mut tree = BBDTree {
nodes,
Expand Down

0 comments on commit af5033b

Please sign in to comment.