From ee46e7cd1a34a5901cb67f2d01247985b6ca0285 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Tue, 15 Dec 2020 11:45:40 +0100 Subject: [PATCH] Simplify extraction of builder fields --- src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index be40feb..5bf6b56 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,12 +26,8 @@ where } fn new(points: &[P], builder: Builder) -> (Self, Vec) { - 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 (