@ -118,7 +118,7 @@ pub fn Context(comptime ctx: anytype) type {
const id_ptr = lookupMut ( T ) ;
const id_ptr = lookupMut ( T ) ;
if ( id_ptr . * ! = 0 and id_ptr . * ! = entity . raw ) {
if ( id_ptr . * ! = 0 and id_ptr . * ! = entity . raw ) {
if ( ! meta . isNull ( error_writer ) )
if ( ! meta . isNull ( error_writer ) )
try std . fmt . format ( error_writer , " Trying to register lookup for entity '{any }' as {d}, but it's already registered as {d} " , . { entity , entity . raw , id_ptr . * } ) ;
try std . fmt . format ( error_writer , " Trying to register lookup for entity '{}' as {d}, but it's already registered as {d} \n " , . { entity , entity . raw , id_ptr . * } ) ;
return error . LookupIdMismatch ;
return error . LookupIdMismatch ;
}
}
id_ptr . * = entity . raw ;
id_ptr . * = entity . raw ;
@ -126,9 +126,9 @@ pub fn Context(comptime ctx: anytype) type {
} else {
} else {
if ( ! meta . isNull ( error_writer ) ) {
if ( ! meta . isNull ( error_writer ) ) {
if ( parent ) | p |
if ( parent ) | p |
try std . fmt . format ( error_writer , " Could not find child '{s}' of parent '{any }' " , . { name , p } )
try std . fmt . format ( error_writer , " Could not find child '{s}' of parent '{}' \n " , . { name , p } )
else
else
try std . fmt . format ( error_writer , " Could not find root entity '{s}' " , . { name } ) ;
try std . fmt . format ( error_writer , " Could not find root entity '{s}' \n " , . { name } ) ;
}
}
return error . EntityNotFound ;
return error . EntityNotFound ;
}
}