Skip to content

Commit

Permalink
FIX: Minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatcher committed Feb 13, 2024
1 parent 0519c38 commit d58d3b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions xlsx/src/import/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ pub(crate) fn load_table<R: Read + std::io::Seek>(
.filter(|n| n.has_tag_name("autoFilter"))
.collect::<Vec<Node>>();

let has_filters = if let Some(filter) = auto_filter.get(0) {
let has_filters = if let Some(filter) = auto_filter.first() {
filter.children().count() > 0
} else {
false
Expand Down Expand Up @@ -179,7 +179,7 @@ pub(crate) fn load_table<R: Read + std::io::Seek>(
.descendants()
.filter(|n| n.has_tag_name("tableInfo"))
.collect::<Vec<Node>>();
let style_info = match table_info.get(0) {
let style_info = match table_info.first() {
Some(node) => {
let name = node.attribute("name").map(|s| s.to_string());
TableStyleInfo {
Expand Down
4 changes: 0 additions & 4 deletions xlsx/src/import/worksheets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use ironcalc_base::{
types::{Cell, Col, Comment, DefinedName, Row, SheetData, SheetState, Table, Worksheet},
};
use roxmltree::Node;
use serde::{Deserialize, Serialize};
use thiserror::Error;

use crate::error::XlsxError;
Expand All @@ -20,21 +19,18 @@ use super::{
util::{get_attribute, get_color, get_number},
};

#[derive(Serialize, Deserialize)]
pub(crate) struct Sheet {
pub(crate) name: String,
pub(crate) sheet_id: u32,
pub(crate) id: String,
pub(crate) state: SheetState,
}

#[derive(Serialize, Deserialize)]
pub(crate) struct WorkbookXML {
pub(crate) worksheets: Vec<Sheet>,
pub(crate) defined_names: Vec<DefinedName>,
}

#[derive(Serialize, Deserialize)]
pub(crate) struct Relationship {
pub(crate) target: String,
pub(crate) rel_type: String,
Expand Down

0 comments on commit d58d3b2

Please sign in to comment.