Revert "test: use gpt-oss-20b to do some minor refactoring"
This reverts commit bbd1f48b78.
This commit is contained in:
@ -291,7 +291,7 @@ impl<'a> GridWidget<'a> {
|
||||
};
|
||||
let value = self.model.evaluate(&key);
|
||||
|
||||
let cell_str = format_cell_value(value.as_ref(), &view.number_format);
|
||||
let cell_str = format_value(value.as_ref(), fmt_comma, fmt_decimals);
|
||||
let is_selected = ri == sel_row && ci == sel_col;
|
||||
let is_search_match = !self.search_query.is_empty()
|
||||
&& cell_str
|
||||
@ -435,7 +435,7 @@ impl<'a> Widget for GridWidget<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn format_value(v: Option<&CellValue>, comma: bool, decimals: u8) -> String {
|
||||
fn format_value(v: Option<&CellValue>, comma: bool, decimals: u8) -> String {
|
||||
match v {
|
||||
Some(CellValue::Number(n)) => format_f64(*n, comma, decimals),
|
||||
Some(CellValue::Text(s)) => s.clone(),
|
||||
@ -443,11 +443,6 @@ pub fn format_value(v: Option<&CellValue>, comma: bool, decimals: u8) -> String
|
||||
}
|
||||
}
|
||||
|
||||
fn format_cell_value(v: Option<&CellValue>, fmt: &str) -> String {
|
||||
let (comma, decimals) = parse_number_format(fmt);
|
||||
format_value(v, comma, decimals)
|
||||
}
|
||||
|
||||
pub fn parse_number_format(fmt: &str) -> (bool, u8) {
|
||||
let comma = fmt.contains(',');
|
||||
let decimals = fmt
|
||||
|
||||
Reference in New Issue
Block a user