pub fn sort(&mut self) {
        self.versioned_files.sort_by(|a, b| {
            match a {
                VersionedFileV3::AnimFragment(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Equal,
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::AnimTable(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Equal,
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::DB(table_name_a, _) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Greater,
                        VersionedFileV3::DB(table_name_b, _) => table_name_a.cmp(table_name_b),
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::DepManager(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Greater,
                        VersionedFileV3::DB(_,_) => Ordering::Greater,
                        VersionedFileV3::DepManager(_) => Ordering::Equal,
                        VersionedFileV3::Loc(_) => Ordering::Less,
                        VersionedFileV3::MatchedCombat(_) => Ordering::Less,
                    }
                }
                VersionedFileV3::Loc(_) => {
                    match b {
                        VersionedFileV3::Loc(_) => Ordering::Equal,
                        VersionedFileV3::MatchedCombat(_) => Ordering::Less,
                        _ => Ordering::Greater,
                    }
                }
                VersionedFileV3::MatchedCombat(_) => {
                    match b {
                        VersionedFileV3::MatchedCombat(_) => Ordering::Equal,
                        _ => Ordering::Greater,
                    }
                }
            }
        });
    }
/// This function sorts a `Schema` alphabetically, so the schema diffs are more or less clean.
This function sorts a `Schema` alphabetically, so the schema diffs are more or less clean.
This function sorts a ` Schema ` alphabetically so the schema diffs are more or less clean .
pub fn sort(&mut self) {
        self.versioned_files.sort_by(|a, b| {
            match a {
                VersionedFileV3::AnimFragment(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Equal,
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::AnimTable(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Equal,
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::DB(table_name_a, _) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Greater,
                        VersionedFileV3::DB(table_name_b, _) => table_name_a.cmp(table_name_b),
                        _ => Ordering::Less,
                    }
                }
                VersionedFileV3::DepManager(_) => {
                    match b {
                        VersionedFileV3::AnimFragment(_) => Ordering::Greater,
                        VersionedFileV3::AnimTable(_) => Ordering::Greater,
                        VersionedFileV3::DB(_,_) => Ordering::Greater,
                        VersionedFileV3::DepManager(_) => Ordering::Equal,
                        VersionedFileV3::Loc(_) => Ordering::Less,
                        VersionedFileV3::MatchedCombat(_) => Ordering::Less,
                    }
                }
                VersionedFileV3::Loc(_) => {
                    match b {
                        VersionedFileV3::Loc(_) => Ordering::Equal,
                        VersionedFileV3::MatchedCombat(_) => Ordering::Less,
                        _ => Ordering::Greater,
                    }
                }
                VersionedFileV3::MatchedCombat(_) => {
                    match b {
                        VersionedFileV3::MatchedCombat(_) => Ordering::Equal,
                        _ => Ordering::Greater,
                    }
                }
            }
        });
    }
pub fn sort ( & mut self ) { self . versioned_files . sort_by ( | a , b | { match a { VersionedFileV3 :: AnimFragment ( _ ) => { match b { VersionedFileV3 :: AnimFragment ( _ ) => Ordering :: Equal , _ => Ordering :: Less , } } VersionedFileV3 :: AnimTable ( _ ) => { match b { VersionedFileV3 :: AnimFragment ( _ ) => Ordering :: Greater , VersionedFileV3 :: AnimTable ( _ ) => Ordering :: Equal , _ => Ordering :: Less , } } VersionedFileV3 :: DB ( table_name_a , _ ) => { match b { VersionedFileV3 :: AnimFragment ( _ ) => Ordering :: Greater , VersionedFileV3 :: AnimTable ( _ ) => Ordering :: Greater , VersionedFileV3 :: DB ( table_name_b , _ ) => table_name_a . cmp ( table_name_b ) , _ => Ordering :: Less , } } VersionedFileV3 :: DepManager ( _ ) => { match b { VersionedFileV3 :: AnimFragment ( _ ) => Ordering :: Greater , VersionedFileV3 :: AnimTable ( _ ) => Ordering :: Greater , VersionedFileV3 :: DB ( _ , _ ) => Ordering :: Greater , VersionedFileV3 :: DepManager ( _ ) => Ordering :: Equal , VersionedFileV3 :: Loc ( _ ) => Ordering :: Less , VersionedFileV3 :: MatchedCombat ( _ ) => Ordering :: Less , } } VersionedFileV3 :: Loc ( _ ) => { match b { VersionedFileV3 :: Loc ( _ ) => Ordering :: Equal , VersionedFileV3 :: MatchedCombat ( _ ) => Ordering :: Less , _ => Ordering :: Greater , } } VersionedFileV3 :: MatchedCombat ( _ ) => { match b { VersionedFileV3 :: MatchedCombat ( _ ) => Ordering :: Equal , _ => Ordering :: Greater , } } } } ) ; }
This function sorts a `Schema` alphabetically, so the schema diffs are more or less clean.
This function sorts a ` Schema ` alphabetically so the schema diffs are more or less clean .
&mut self
&mut self