Add a debug assert for org entities being sorted.

This commit is contained in:
Tom Alexander
2023-10-11 09:24:20 -04:00
parent 6e39029f91
commit 0d1ab0e75a
5 changed files with 54 additions and 1 deletions

View File

@@ -71,6 +71,7 @@ pub struct EntityDefinition<'a> {
impl<'g, 's> GlobalSettings<'g, 's> {
fn new() -> GlobalSettings<'g, 's> {
debug_assert!(DEFAULT_ORG_ENTITIES.is_sorted_by(|a, b| b.name.len().partial_cmp(&a.name.len())));
GlobalSettings {
radio_targets: Vec::new(),
file_access: &LocalFileAccessInterface {