Simplify extraction of builder fields

This commit is contained in:
Dirkjan Ochtman 2020-12-15 11:45:40 +01:00
parent 07350f201c
commit ee46e7cd1a
1 changed files with 2 additions and 6 deletions

View File

@ -26,12 +26,8 @@ where
}
fn new(points: &[P], builder: Builder) -> (Self, Vec<PointId>) {
let Builder {
ef_search,
ef_construction,
} = builder;
let ef_search = ef_search.unwrap_or(100);
let ef_construction = ef_construction.unwrap_or(100);
let ef_search = builder.ef_search.unwrap_or(100);
let ef_construction = builder.ef_construction.unwrap_or(100);
if points.is_empty() {
return (