Fix some lints
This commit is contained in:
parent
95516d9405
commit
898fbb0c4e
15
src/main.rs
15
src/main.rs
@ -1,8 +1,4 @@
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
collections::{hash_map::Entry, HashMap},
|
||||
path::Path,
|
||||
};
|
||||
use std::{cmp::Ordering, path::Path};
|
||||
|
||||
use clap::Parser;
|
||||
use color_eyre::eyre::Result;
|
||||
@ -11,7 +7,7 @@ use log::{debug, error, info};
|
||||
use serde::Deserialize;
|
||||
use spreadsheet_ods::{
|
||||
formula::{fcellref, fcellrefa, fcellrefa_table},
|
||||
write_ods, CellStyle, CellStyleRef, Sheet, ValueFormatNumber, WorkBook,
|
||||
write_ods, Sheet, WorkBook,
|
||||
};
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
@ -45,7 +41,7 @@ fn main() -> Result<()> {
|
||||
color_eyre::install()?;
|
||||
stderrlog::new()
|
||||
.module(module_path!())
|
||||
.verbosity(3)
|
||||
.verbosity(2)
|
||||
.init()?;
|
||||
let args = Args::parse();
|
||||
|
||||
@ -93,6 +89,7 @@ fn main() -> Result<()> {
|
||||
sheet.set_value(0, 5, "WE Part");
|
||||
|
||||
for (i, entry) in bom.entries.iter().enumerate() {
|
||||
debug!("found {:?}", entry);
|
||||
let row = u32::try_from(i)? + 1;
|
||||
sheet.set_value(row, 0, row);
|
||||
sheet.set_value(row, 1, &entry.reference);
|
||||
@ -131,6 +128,10 @@ fn main() -> Result<()> {
|
||||
let mut boards = vec![];
|
||||
let summary_sheet = wb.sheet_mut(0);
|
||||
for (i, (value, footprint, we_part, refs)) in parts.iter().enumerate() {
|
||||
debug!(
|
||||
"Adding ({:?}, {:?}, {:?}) to summary",
|
||||
value, footprint, we_part
|
||||
);
|
||||
let row = u32::try_from(i)? + 1;
|
||||
summary_sheet.set_value(row, 0, row);
|
||||
summary_sheet.set_value(row, 2, value);
|
||||
|
Loading…
Reference in New Issue
Block a user