Skip to content

Commit

Permalink
Fix a few clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
bschwind committed Sep 1, 2023
1 parent df3e3fb commit 87b540b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions crates/kicad-parser/src/board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
}
Expand Down Expand Up @@ -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)
}
}
3 changes: 2 additions & 1 deletion crates/kicad-parser/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use opencascade::primitives::Shape;
use anyhow::{anyhow, Result};
use glam::DVec3;

Expand All @@ -14,7 +15,7 @@ fn main() -> Result<()> {
// let outline: Face = Into::<Face>::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")?;

Expand Down

0 comments on commit 87b540b

Please sign in to comment.