validator: code tweaks
This commit is contained in:
parent
ccf07c5931
commit
c57a53692d
@ -262,7 +262,7 @@ pub struct MapInfoOwned{
|
||||
pub struct MapCheck<'a>{
|
||||
// === METADATA CHECKS ===
|
||||
// The root must be of class Model
|
||||
model_class:StringCheck<'a,(),&'a str>,
|
||||
model_class:StringCheck<'a,(),&'static str>,
|
||||
// Model's name must be in snake case
|
||||
model_name:StringCheck<'a,(),String>,
|
||||
// Map must have a StringValue named DisplayName.
|
||||
@ -470,18 +470,16 @@ impl<'a> std::fmt::Display for MapCheck<'a>{
|
||||
}
|
||||
if let DuplicateCheck(Err(DuplicateCheckContext(context)))=&self.spawn_counts{
|
||||
write!(f,"Duplicate spawn zones: ")?;
|
||||
comma_separated(f,context.iter(),|f,(SpawnID(spawn_id),count)|{
|
||||
write!(f,"Spawn{spawn_id}({count} duplicates)")?;
|
||||
Ok(())
|
||||
})?;
|
||||
comma_separated(f,context.iter(),|f,(SpawnID(spawn_id),count)|
|
||||
write!(f,"Spawn{spawn_id}({count} duplicates)")
|
||||
)?;
|
||||
writeln!(f,"")?;
|
||||
}
|
||||
if let DuplicateCheck(Err(DuplicateCheckContext(context)))=&self.wormhole_out_counts{
|
||||
write!(f,"Duplicate wormhole out: ")?;
|
||||
comma_separated(f,context.iter(),|f,(WormholeOutID(wormhole_out_id),count)|{
|
||||
write!(f,"WormholeOut{wormhole_out_id}({count} duplicates)")?;
|
||||
Ok(())
|
||||
})?;
|
||||
comma_separated(f,context.iter(),|f,(WormholeOutID(wormhole_out_id),count)|
|
||||
write!(f,"WormholeOut{wormhole_out_id}({count} duplicates)")
|
||||
)?;
|
||||
writeln!(f,"")?;
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
x
Reference in New Issue
Block a user