Skip to content

Commit

Permalink
Run cargo dev fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
JarredAllen committed Aug 5, 2020
1 parent 25abd7a commit 542740c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions clippy_lints/src/stable_sort_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,30 @@ declare_lint_pass!(StableSortPrimitive => [STABLE_SORT_PRIMITIVE]);
/// The three "kinds" of sorts
enum SortingKind {
Vanilla,
// The other kinds of lint are currently commented out because they
// can map distinct values to equal ones. If the key function is
// provably one-to-one, or if the Cmp function conserves equality,
// then they could be linted on, but I don't know if we can check
// for that.
/* The other kinds of lint are currently commented out because they
* can map distinct values to equal ones. If the key function is
* provably one-to-one, or if the Cmp function conserves equality,
* then they could be linted on, but I don't know if we can check
* for that. */

// ByKey,
// ByCmp,
/* ByKey,
* ByCmp, */
}
impl SortingKind {
/// The name of the stable version of this kind of sort
fn stable_name(&self) -> &str {
match self {
SortingKind::Vanilla => "sort",
// SortingKind::ByKey => "sort_by_key",
// SortingKind::ByCmp => "sort_by",
/* SortingKind::ByKey => "sort_by_key",
* SortingKind::ByCmp => "sort_by", */
}
}
/// The name of the unstable version of this kind of sort
fn unstable_name(&self) -> &str {
match self {
SortingKind::Vanilla => "sort_unstable",
// SortingKind::ByKey => "sort_unstable_by_key",
// SortingKind::ByCmp => "sort_unstable_by",
/* SortingKind::ByKey => "sort_unstable_by_key",
* SortingKind::ByCmp => "sort_unstable_by", */
}
}
/// Takes the name of a function call and returns the kind of sort
Expand Down

0 comments on commit 542740c

Please sign in to comment.