Skip to content

Commit

Permalink
fix!: Remove --sort
Browse files Browse the repository at this point in the history
We are shifting the focus to editing within a specific style but we
won't be modifying styles.  That is best left for a "rustfmt for
manifests".
  • Loading branch information
epage committed Jan 26, 2022
1 parent 8e50285 commit 20a6397
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 32 deletions.
5 changes: 0 additions & 5 deletions src/bin/add/args.rs
Expand Up @@ -130,10 +130,6 @@ pub struct Args {
#[clap(long)]
pub offline: bool,

/// Sort dependencies even if currently unsorted
#[clap(long, short)]
pub sort: bool,

/// Registry to use
#[clap(long, conflicts_with = "git", conflicts_with = "path")]
pub registry: Option<String>,
Expand Down Expand Up @@ -362,7 +358,6 @@ impl Default for Args {
no_default_features: false,
quiet: false,
offline: true,
sort: false,
registry: None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bin/add/main.rs
Expand Up @@ -212,7 +212,7 @@ fn handle_add(args: &Args) -> Result<()> {
.map(TomlItem::as_table_mut)
.map(|table_option| {
table_option.map(|table| {
if was_sorted || args.sort {
if was_sorted {
table.sort_values();
}
})
Expand Down
7 changes: 0 additions & 7 deletions tests/cmd/add/sort.in/Cargo.toml

This file was deleted.

Empty file removed tests/cmd/add/sort.in/src/lib.rs
Empty file.
8 changes: 0 additions & 8 deletions tests/cmd/add/sort.out/Cargo.toml

This file was deleted.

11 changes: 0 additions & 11 deletions tests/cmd/add/sort.toml

This file was deleted.

0 comments on commit 20a6397

Please sign in to comment.