Skip to content

Commit

Permalink
chore; sort custom type crate dependencies in alphabetical order
Browse files Browse the repository at this point in the history
  • Loading branch information
beanpuppy committed Feb 15, 2025
1 parent 36d2022 commit b8b542c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion clorinde/src/codegen/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ pub fn gen_cargo_file(dependency_analysis: &DependencyAnalysis, config: &Config)
});

if !config.types.crate_info.is_empty() {
for (name, dep) in &config.types.crate_info {
let mut crates: Vec<_> = config.types.crate_info.iter().collect();
crates.sort_by(|(name_a, _), (name_b, _)| name_a.cmp(name_b));

for (name, dep) in crates {
match dep {
CrateDependency::Simple(version) => {
cargo.line(&format!("{} = \"{}\"", name, version));
Expand Down

0 comments on commit b8b542c

Please sign in to comment.