Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Update xlsxwriter due to compilation error with older version #257

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ regex = "1.3"
tera = "1"
jsonm = "0.1.4"
chrono = "0.4"
xlsxwriter = {version = "0.3.5", features= ["use-openssl-md5", "no-md5"]}
xlsxwriter = {version = "0.6", features= ["use-openssl-md5", "no-md5"]}
lazy_static = "1.4"
anyhow = "1"
thiserror = "1"
Expand Down
4 changes: 2 additions & 2 deletions src/csv/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::path::Path;
use std::str::FromStr;
use tera::{Context, Tera};
use xlsxwriter::*;
use xlsxwriter::prelude::*;

type LookupTable = HashMap<String, HashMap<String, Vec<(String, usize, usize)>>>;

Expand Down Expand Up @@ -127,7 +127,7 @@
(_, _) => {}
}

let wb = Workbook::new(&(output_path.to_owned() + "/report.xlsx"));
let wb = Workbook::new(&(output_path.to_owned() + "/report.xlsx"))?;
let mut sheet = wb.add_worksheet(Some("Report"))?;
for (i, title) in titles.iter().enumerate() {
sheet.write_string(0, i.try_into()?, title, None)?;
Expand Down Expand Up @@ -485,7 +485,7 @@
.collect_vec();

if plot_data.len() > 10 {
let unique_values: HashSet<_> = count_values.iter().map(|(_, v)| v).collect();

Check warning on line 488 in src/csv/report.rs

View workflow job for this annotation

GitHub Actions / clippy

iterating on a map's values

warning: iterating on a map's values --> src/csv/report.rs:488:41 | 488 | let unique_values: HashSet<_> = count_values.iter().map(|(_, v)| v).collect(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `count_values.values()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map = note: `#[warn(clippy::iter_kv_map)]` on by default
if unique_values.len() <= 1 {
return None;
};
Expand Down
Loading