From 87b540b6209adb7a960e0f02d14244844639f7cb Mon Sep 17 00:00:00 2001 From: Brian Schwind Date: Fri, 1 Sep 2023 16:14:27 +0900 Subject: [PATCH] Fix a few clippy lints --- crates/kicad-parser/src/board.rs | 5 ++--- crates/kicad-parser/src/main.rs | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/kicad-parser/src/board.rs b/crates/kicad-parser/src/board.rs index febf37f3..d198f6fb 100644 --- a/crates/kicad-parser/src/board.rs +++ b/crates/kicad-parser/src/board.rs @@ -101,7 +101,7 @@ impl<'a> From<&'a BoardLayer> for &'a str { BoardLayer::In2Cu => "In2.Cu", BoardLayer::In3Cu => "In3.Cu", BoardLayer::In4Cu => "In4.Cu", - BoardLayer::User(ref s) => &s, + BoardLayer::User(ref s) => s, } } } @@ -201,8 +201,7 @@ impl KicadBoard { } pub fn outline(&self, _offset: f64) -> Face { - let outline = self.layer_face(BoardLayer::EdgeCuts); // TODO apply offset around the face - outline + self.layer_face(BoardLayer::EdgeCuts) } } diff --git a/crates/kicad-parser/src/main.rs b/crates/kicad-parser/src/main.rs index a857f45b..12a94cdf 100644 --- a/crates/kicad-parser/src/main.rs +++ b/crates/kicad-parser/src/main.rs @@ -1,3 +1,4 @@ +use opencascade::primitives::Shape; use anyhow::{anyhow, Result}; use glam::DVec3; @@ -14,7 +15,7 @@ fn main() -> Result<()> { // let outline: Face = Into::::into(&board.graphic_rects[0]); let solid = outline.extrude(DVec3 { x: 0.0, y: 0.0, z: 10.0 }); - let mut shape = solid.to_shape(); + let mut shape: Shape = solid.into(); shape.clean(); shape.write_stl("outline.stl")?;