We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9249548 commit c14f0cbCopy full SHA for c14f0cb
1 file changed
crates/famst/src/lib.rs
@@ -158,13 +158,7 @@ where
158
R: Rng,
159
{
160
let n = data.len();
161
- if n == 0 {
162
- return FamstResult {
163
- edges: vec![],
164
- total_weight: 0.0,
165
- };
166
- }
167
- if n == 1 {
+ if n <= 1 {
168
return FamstResult {
169
edges: vec![],
170
total_weight: 0.0,
@@ -178,7 +172,6 @@ where
178
172
let (undirected_graph, components) = find_components(&ann_graph);
179
173
180
174
// If only one component, skip inter-component edge logic
181
- println!("components {}", components.len());
182
175
if components.len() <= 1 {
183
176
let edges = extract_mst_from_ann(&ann_graph, n);
184
177
let total_weight = edges.iter().map(|e| e.distance).sum();
0 commit comments