mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-28 12:16:53 -06:00
Merge pull request #1718 from storytold/sonar/s1612-b
chore: method paths for remaining closures (Sonar S1612)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user