Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 22aeec0

Browse files
committed
lintcheck: sort crates before linting
1 parent 4974734 commit 22aeec0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clippy_dev/src/lintcheck.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct TomlCrate {
3939

4040
/// Represents an archive we download from crates.io, or a git repo, or a local repo/folder
4141
/// Once processed (downloaded/extracted/cloned/copied...), this will be translated into a `Crate`
42-
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq)]
42+
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq, Ord, PartialOrd)]
4343
enum CrateSource {
4444
CratesIo {
4545
name: String,
@@ -376,6 +376,9 @@ fn read_crates(toml_path: Option<&str>) -> (String, Vec<CrateSource>) {
376376
unreachable!("Failed to translate TomlCrate into CrateSource!");
377377
}
378378
});
379+
// sort the crates
380+
crate_sources.sort();
381+
379382
(toml_filename, crate_sources)
380383
}
381384

0 commit comments

Comments
 (0)