Remove redundant constructor

This commit is contained in:
Hanno Braun 2022-04-12 17:09:53 +02:00
parent d96a2bf16b
commit c55649ead2

View File

@ -78,7 +78,9 @@ fn main() -> anyhow::Result<()> {
parameters.insert(key, value); parameters.insert(key, value);
} }
let shape_processor = ShapeProcessor::new(args.tolerance)?; let shape_processor = ShapeProcessor {
tolerance: args.tolerance,
};
if let Some(path) = args.export { if let Some(path) = args.export {
let shape = model.load_once(&parameters)?; let shape = model.load_once(&parameters)?;
@ -242,10 +244,6 @@ struct ShapeProcessor {
} }
impl ShapeProcessor { impl ShapeProcessor {
fn new(tolerance: Option<Tolerance>) -> anyhow::Result<Self> {
Ok(Self { tolerance })
}
fn process(&self, shape: &fj::Shape) -> ProcessedShape { fn process(&self, shape: &fj::Shape) -> ProcessedShape {
let aabb = shape.bounding_volume(); let aabb = shape.bounding_volume();