From c55649ead205f00bf739acc907f698b09274885c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 12 Apr 2022 17:09:53 +0200 Subject: [PATCH] Remove redundant constructor --- fj-app/src/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fj-app/src/main.rs b/fj-app/src/main.rs index 91008970e..6589f1553 100644 --- a/fj-app/src/main.rs +++ b/fj-app/src/main.rs @@ -78,7 +78,9 @@ fn main() -> anyhow::Result<()> { parameters.insert(key, value); } - let shape_processor = ShapeProcessor::new(args.tolerance)?; + let shape_processor = ShapeProcessor { + tolerance: args.tolerance, + }; if let Some(path) = args.export { let shape = model.load_once(¶meters)?; @@ -242,10 +244,6 @@ struct ShapeProcessor { } impl ShapeProcessor { - fn new(tolerance: Option) -> anyhow::Result { - Ok(Self { tolerance }) - } - fn process(&self, shape: &fj::Shape) -> ProcessedShape { let aabb = shape.bounding_volume();