mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 00:47:16 +00:00
lintcheck: sort crates before linting
This commit is contained in:
parent
4974734a24
commit
22aeec09e4
1 changed files with 4 additions and 1 deletions
|
@ -39,7 +39,7 @@ struct TomlCrate {
|
|||
|
||||
/// Represents an archive we download from crates.io, or a git repo, or a local repo/folder
|
||||
/// Once processed (downloaded/extracted/cloned/copied...), this will be translated into a `Crate`
|
||||
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq)]
|
||||
#[derive(Debug, Serialize, Deserialize, Eq, Hash, PartialEq, Ord, PartialOrd)]
|
||||
enum CrateSource {
|
||||
CratesIo {
|
||||
name: String,
|
||||
|
@ -376,6 +376,9 @@ fn read_crates(toml_path: Option<&str>) -> (String, Vec<CrateSource>) {
|
|||
unreachable!("Failed to translate TomlCrate into CrateSource!");
|
||||
}
|
||||
});
|
||||
// sort the crates
|
||||
crate_sources.sort();
|
||||
|
||||
(toml_filename, crate_sources)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue