From bdd2c8fe04c77970c342eddd2f6963940b3e66c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher?= Date: Sat, 16 Nov 2024 13:02:45 +0100 Subject: [PATCH] FIX: Fix several indentation issues in comments Thanks clippy! --- base/src/actions.rs | 4 ++-- base/src/expressions/token.rs | 2 +- base/src/functions/text.rs | 4 ++-- base/src/model.rs | 4 ++-- base/src/worksheet.rs | 2 ++ 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/base/src/actions.rs b/base/src/actions.rs index e288d14..126466f 100644 --- a/base/src/actions.rs +++ b/base/src/actions.rs @@ -383,11 +383,11 @@ impl Model { /// * All cell references to initial_column will go to target_column /// * All cell references to columns in between (initial_column, target_column] will be displaced one to the left /// * All other cell references are left unchanged - /// Ranges. This is the tricky bit: + /// Ranges. This is the tricky bit: /// * Column is one of the extremes of the range. The new extreme would be target_column. /// Range is then normalized /// * Any other case, range is left unchanged. - /// NOTE: This does NOT move the data in the columns or move the colum styles + /// NOTE: This does NOT move the data in the columns or move the colum styles pub fn move_column_action( &mut self, sheet: u32, diff --git a/base/src/expressions/token.rs b/base/src/expressions/token.rs index 9b97f0f..877ddc6 100644 --- a/base/src/expressions/token.rs +++ b/base/src/expressions/token.rs @@ -79,7 +79,7 @@ impl fmt::Display for OpProduct { /// Note that "#ERROR!" and "#N/IMPL!" are not part of the xlsx standard /// * "#ERROR!" means there was an error processing the formula (for instance "=A1+") /// * "#N/IMPL!" means the formula or feature in Excel but has not been implemented in IronCalc -/// Note that they are serialized/deserialized by index +/// Note that they are serialized/deserialized by index #[derive(Serialize, Deserialize, Encode, Decode, Debug, PartialEq, Eq, Clone)] pub enum Error { REF, diff --git a/base/src/functions/text.rs b/base/src/functions/text.rs index bcb3d35..a72b8ee 100644 --- a/base/src/functions/text.rs +++ b/base/src/functions/text.rs @@ -151,7 +151,7 @@ impl Model { /// * If find_text does not appear in within_text, FIND and FINDB return the #VALUE! error value. /// * If start_num is not greater than zero, FIND and FINDB return the #VALUE! error value. /// * If start_num is greater than the length of within_text, FIND and FINDB return the #VALUE! error value. - /// NB: FINDB is not implemented. It is the same as FIND function unless locale is a DBCS (Double Byte Character Set) + /// NB: FINDB is not implemented. It is the same as FIND function unless locale is a DBCS (Double Byte Character Set) pub(crate) fn fn_find(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult { if args.len() < 2 || args.len() > 3 { return CalcResult::new_args_number_error(cell); @@ -203,7 +203,7 @@ impl Model { /// Same API as FIND but: /// * Allows wildcards /// * It is case insensitive - /// SEARCH(find_text, within_text, [start_num]) + /// SEARCH(find_text, within_text, [start_num]) pub(crate) fn fn_search(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult { if args.len() < 2 || args.len() > 3 { return CalcResult::new_args_number_error(cell); diff --git a/base/src/model.rs b/base/src/model.rs index f110d8a..a64b86e 100644 --- a/base/src/model.rs +++ b/base/src/model.rs @@ -90,11 +90,11 @@ pub(crate) enum ParsedDefinedName { /// * The Locale: a parsed version of the Workbook's locale /// * The Timezone: an object representing the Workbook's timezone /// * The language. Note that the timezone and the locale belong to the workbook while -/// the language can be different for different users looking _at the same_ workbook. +/// the language can be different for different users looking _at the same_ workbook. /// * Parsed Formulas: All the formulas in the workbook are parsed here (runtime only) /// * A list of cells with its status (evaluating, evaluated, not evaluated) /// * A dictionary with the shared strings and their indices. -/// This is an optimization for large files (~1 million rows) +/// This is an optimization for large files (~1 million rows) pub struct Model { /// A Rust internal representation of an Excel workbook pub workbook: Workbook, diff --git a/base/src/worksheet.rs b/base/src/worksheet.rs index 94d038d..d5fcbe5 100644 --- a/base/src/worksheet.rs +++ b/base/src/worksheet.rs @@ -254,6 +254,7 @@ impl Worksheet { /// Changes the height of a row. /// * If the row does not a have a style we add it. /// * If it has we modify the height and make sure it is applied. + /// /// Fails if column index is outside allowed range. pub fn set_row_height(&mut self, row: i32, height: f64) -> Result<(), String> { if !is_valid_row(row) { @@ -282,6 +283,7 @@ impl Worksheet { /// Changes the width of a column. /// * If the column does not a have a width we simply add it /// * If it has, it might be part of a range and we ned to split the range. + /// /// Fails if column index is outside allowed range. pub fn set_column_width(&mut self, column: i32, width: f64) -> Result<(), String> { self.set_column_width_and_style(column, width, None)