formats: format the SBS size check

This commit is contained in:
Dylan M. Taylor committed 2026-11-14 14:44:58 -05:00
1 parent 05f29658d3
commit f37d32e728
1 file changed
+9 -2
+9 -2
View File
@@ -33,8 +33,15 @@ pub fn read_sbs(bytes: &[u8], name: &str, linked: &dyn Fn(&str) -> Option<Vec<u8
_ => "Untitled package".to_string(),
};
let mut reader =
SbsReader { text, warnings: &mut warnings, dependencies: HashMap::new(), graph_names: HashMap::new(), resource_names: HashMap::new(), node_count: 0, wire_count: 0 };
let mut reader = SbsReader {
text,
warnings: &mut warnings,
dependencies: HashMap::new(),
graph_names: HashMap::new(),
resource_names: HashMap::new(),
node_count: 0,
wire_count: 0,
};
for dependency in child_element(root, "dependencies").into_iter().flat_map(|d| children_named(d, "dependency")) {
if let (Some(uid), Some(file)) = (child_value(dependency, "uid"), child_value(dependency, "filename")) {
reader.dependencies.insert(uid.to_string(), file.to_string());