Merge pull request #1718 from storytold/sonar/s1612-b

chore: method paths for remaining closures (Sonar S1612)
This commit is contained in:
Dylan M. Taylor
2026-10-25 16:30:13 -04:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ pub fn table_from_objects(rows: &[Value]) -> Result<Table, String> {
warnings.push(format!("Row {} has an extra field \"{key}\". It was ignored.", i + 1));
}
}
if cells.iter().all(|c| c.is_empty()) {
if cells.iter().all(String::is_empty) {
continue;
}
out.push(cells);
+1 -1
View File
@@ -88,7 +88,7 @@ impl El {
if let Some(v) = self.get(k) {
return Some(v.to_string());
}
self.prop_el(k).map(|e| e.text_content())
self.prop_el(k).map(El::text_content)
}
pub fn prop_el(&self, k: &str) -> Option<&El> {
self.find("Properties").and_then(|p| p.find(k))
+1 -1
View File
@@ -173,7 +173,7 @@ pub fn records(bytes: &[u8], sheet: Option<&str>) -> Result<Vec<Vec<String>>, Im
extra.push(v.clone());
}
}
if *r != header_row && row.iter().all(|c| c.is_empty()) && extra.is_empty() {
if *r != header_row && row.iter().all(String::is_empty) && extra.is_empty() {
continue;
}
row.extend(extra);