FIX: Cargo fmt
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
0be7d9b85a
commit
5744ae4d77
@@ -572,9 +572,7 @@ impl Lexer {
|
||||
}
|
||||
self.position = position;
|
||||
match chars.parse::<f64>() {
|
||||
Err(_) => {
|
||||
Err(self.set_error(&format!("Failed to parse to double: {chars}"), position))
|
||||
}
|
||||
Err(_) => Err(self.set_error(&format!("Failed to parse to double: {chars}"), position)),
|
||||
Ok(v) => Ok(v),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,8 +148,9 @@ impl Lexer {
|
||||
let row_left = match row_left.parse::<i32>() {
|
||||
Ok(n) => n,
|
||||
Err(_) => {
|
||||
return Err(self
|
||||
.set_error(&format!("Failed parsing row {row_left}"), position))
|
||||
return Err(
|
||||
self.set_error(&format!("Failed parsing row {row_left}"), position)
|
||||
)
|
||||
}
|
||||
};
|
||||
let row_right = match row_right.parse::<i32>() {
|
||||
|
||||
@@ -84,9 +84,7 @@ impl Model {
|
||||
CalcResult::String(value) => {
|
||||
result = format!("{result}{value}");
|
||||
}
|
||||
CalcResult::Number(value) => {
|
||||
result = format!("{result}{value}")
|
||||
}
|
||||
CalcResult::Number(value) => result = format!("{result}{value}"),
|
||||
CalcResult::Boolean(value) => {
|
||||
if value {
|
||||
result = format!("{result}TRUE");
|
||||
|
||||
@@ -37,11 +37,7 @@ pub(crate) fn get_core_xml(workbook: &Workbook, milliseconds: i64) -> Result<Str
|
||||
let seconds = milliseconds / 1000;
|
||||
let dt = match DateTime::from_timestamp(seconds, 0) {
|
||||
Some(s) => s,
|
||||
None => {
|
||||
return Err(XlsxError::Xml(format!(
|
||||
"Invalid timestamp: {milliseconds}"
|
||||
)))
|
||||
}
|
||||
None => return Err(XlsxError::Xml(format!("Invalid timestamp: {milliseconds}"))),
|
||||
};
|
||||
let last_modified = dt.format("%Y-%m-%dT%H:%M:%SZ").to_string();
|
||||
Ok(format!(
|
||||
|
||||
@@ -407,9 +407,7 @@ fn get_cell_from_excel(
|
||||
"empty" => Cell::EmptyCell { s: cell_style },
|
||||
_ => {
|
||||
// error
|
||||
println!(
|
||||
"Unexpected type ({cell_type}) in {sheet_name}!{cell_ref}"
|
||||
);
|
||||
println!("Unexpected type ({cell_type}) in {sheet_name}!{cell_ref}");
|
||||
Cell::ErrorCell {
|
||||
ei: Error::ERROR,
|
||||
s: cell_style,
|
||||
@@ -496,9 +494,7 @@ fn get_cell_from_excel(
|
||||
}
|
||||
_ => {
|
||||
// error
|
||||
println!(
|
||||
"Unexpected type ({cell_type}) in {sheet_name}!{cell_ref}"
|
||||
);
|
||||
println!("Unexpected type ({cell_type}) in {sheet_name}!{cell_ref}");
|
||||
let o = format!("{sheet_name}!{cell_ref}");
|
||||
let m = Error::ERROR.to_string();
|
||||
Cell::CellFormulaError {
|
||||
|
||||
Reference in New Issue
Block a user