FIX: Consolidate two structs

This commit is contained in:
Nicolas Hatcher
2024-02-20 15:19:05 +01:00
parent 55a963e360
commit ab2f1f10fc
26 changed files with 379 additions and 395 deletions

View File

@@ -1,9 +1,8 @@
use std::collections::HashMap;
use crate::{
calc_result::{CalcResult, CellReference},
expressions::parser::Node,
expressions::token::Error,
calc_result::CalcResult,
expressions::{parser::Node, token::Error, types::CellReferenceIndex},
model::Model,
};
@@ -44,7 +43,7 @@ fn convert_temperature(
impl Model {
// CONVERT(number, from_unit, to_unit)
pub(crate) fn fn_convert(&mut self, args: &[Node], cell: CellReference) -> CalcResult {
pub(crate) fn fn_convert(&mut self, args: &[Node], cell: CellReferenceIndex) -> CalcResult {
if args.len() != 3 {
return CalcResult::new_args_number_error(cell);
}