fix: apply_kind_properties binds ContentControl; cell_ref keeps char closures

This commit is contained in:
Dylan M. Taylor
2026-10-23 23:07:02 -04:00
parent f3c3c6480a
commit 05a3ac74b0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -579,7 +579,7 @@ fn info(s: &mut Session, v: &Value) -> CmdResult {
Ok(describe(s, &r))
}
fn apply_kind_properties(c: &mut StructuredControl, v: &Value) -> Option<String> {
fn apply_kind_properties(c: &mut ContentControl, v: &Value) -> Option<String> {
let mut content = None;
match &mut c.kind {
ControlKind::Text { multi_line } => {
+1 -1
View File
@@ -482,7 +482,7 @@ impl Parser {
fn cell_ref(name: &str) -> Option<(usize, usize)> {
let letters: String = name.chars().take_while(char::is_ascii_alphabetic).collect();
let digits = name.get(letters.len()..)?;
if letters.is_empty() || digits.is_empty() || !digits.chars().all(char::is_ascii_digit) {
if letters.is_empty() || digits.is_empty() || !digits.chars().all(|c| c.is_ascii_digit()) {
return None;
}
let col = letters.bytes().try_fold(0usize, |acc, b| acc.checked_mul(26)?.checked_add((b.to_ascii_uppercase() - b'A') as usize + 1))? - 1;