chore(server): auto-format Rust code (cargo fmt)
Pre-existing formatting issues in generator_spike.rs and validate_ron.rs caught by the new pre-push lint hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1061,7 +1061,9 @@ fn main() {
|
||||
"Unknown zone type: '{}'. Use 'rural' or 'industrial'.",
|
||||
other
|
||||
);
|
||||
eprintln!("(Phase 2 with --from-files supports zone-type IDs like 'rural_agricultural')");
|
||||
eprintln!(
|
||||
"(Phase 2 with --from-files supports zone-type IDs like 'rural_agricultural')"
|
||||
);
|
||||
process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -111,7 +111,10 @@ fn main() {
|
||||
},
|
||||
"zone_type" => match ron::from_str::<ZoneTypeTemplate>(&content) {
|
||||
Ok(template) => {
|
||||
println!("Valid ZoneTypeTemplate: {} ({})", template.label, template.id);
|
||||
println!(
|
||||
"Valid ZoneTypeTemplate: {} ({})",
|
||||
template.label, template.id
|
||||
);
|
||||
println!(
|
||||
" {} roles, {} social site types",
|
||||
template.roles.len(),
|
||||
@@ -122,14 +125,10 @@ fn main() {
|
||||
eprintln!(" WARNING: no roles defined — generator will reject this");
|
||||
warnings += 1;
|
||||
}
|
||||
let role_ids: Vec<&str> =
|
||||
template.roles.iter().map(|r| r.id.as_str()).collect();
|
||||
let role_ids: Vec<&str> = template.roles.iter().map(|r| r.id.as_str()).collect();
|
||||
for role in &template.roles {
|
||||
if role.behavior_primitives.is_empty() {
|
||||
eprintln!(
|
||||
" WARNING: role '{}' has no behavior_primitives",
|
||||
role.id
|
||||
);
|
||||
eprintln!(" WARNING: role '{}' has no behavior_primitives", role.id);
|
||||
warnings += 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user