Skip to content

Commit

Permalink
Clean up argument preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
ma3ke committed Mar 12, 2024
1 parent 1f4cc29 commit 97c8c15
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bentopy/render/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ fn py_render_placements(
) -> std::io::Result<()> {
eprintln!("Hello, world");
let mode = mode
.map(|m| Mode::from_str(&m).ok())
.flatten()
.and_then(|m| Mode::from_str(&m).ok())
.unwrap_or_default();
let limits = limits.map(|l| Limits::from_str(&l).ok()).flatten();
let limits = limits.and_then(|l| Limits::from_str(&l).ok());
render(input_path, output_path, topol_path, root, limits, mode)
}

Expand Down

0 comments on commit 97c8c15

Please sign in to comment.