Skip to content

Commit 2ca125f

Browse files
authored
Merge pull request #253 from rustcoreutils/cleanups
Cleanups
2 parents 35b957e + 54a88ef commit 2ca125f

File tree

20 files changed

+45
-58
lines changed

20 files changed

+45
-58
lines changed

dev/ar.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::os::unix::ffi::{OsStrExt, OsStringExt};
1616
use std::os::unix::fs::MetadataExt;
1717
use std::path::Path;
1818

19-
#[derive(clap::Args, Debug)]
19+
#[derive(clap::Args)]
2020
#[group(required = false, multiple = false)]
2121
struct InsertArgs {
2222
/// Insert the files after the specified member
@@ -28,7 +28,7 @@ struct InsertArgs {
2828
insert_before: bool,
2929
}
3030

31-
#[derive(clap::Args, Debug)]
31+
#[derive(clap::Args)]
3232
struct DeleteArgs {
3333
/// Give verbose output
3434
#[arg(short = 'v')]
@@ -38,15 +38,15 @@ struct DeleteArgs {
3838
files: Vec<OsString>,
3939
}
4040

41-
#[derive(clap::Args, Debug)]
41+
#[derive(clap::Args)]
4242
struct MoveArgs {
4343
#[command(flatten)]
4444
insert_args: InsertArgs,
4545

4646
files: Vec<OsString>,
4747
}
4848

49-
#[derive(clap::Args, Debug)]
49+
#[derive(clap::Args)]
5050
struct PrintArgs {
5151
/// Give verbose output
5252
#[arg(short = 'v')]
@@ -60,7 +60,7 @@ struct PrintArgs {
6060
files: Vec<OsString>,
6161
}
6262

63-
#[derive(clap::Args, Debug)]
63+
#[derive(clap::Args)]
6464
struct QuickAppendArgs {
6565
/// Suppress archive creation diagnostics
6666
#[arg(short = 'c')]
@@ -74,7 +74,7 @@ struct QuickAppendArgs {
7474
files: Vec<String>,
7575
}
7676

77-
#[derive(clap::Args, Debug)]
77+
#[derive(clap::Args)]
7878
struct ReplaceArgs {
7979
/// Suppress archive creation diagnostics
8080
#[arg(short = 'c')]
@@ -94,7 +94,7 @@ struct ReplaceArgs {
9494
files: Vec<OsString>,
9595
}
9696

97-
#[derive(clap::Args, Debug)]
97+
#[derive(clap::Args)]
9898
struct ListArgs {
9999
/// Give verbose output
100100
#[arg(short = 'v')]
@@ -108,7 +108,7 @@ struct ListArgs {
108108
files: Vec<OsString>,
109109
}
110110

111-
#[derive(clap::Args, Debug)]
111+
#[derive(clap::Args)]
112112
struct ExtractArgs {
113113
/// Give verbose output
114114
#[arg(short = 'v')]
@@ -130,7 +130,7 @@ struct ExtractArgs {
130130
files: Vec<OsString>,
131131
}
132132

133-
#[derive(Subcommand, Debug)]
133+
#[derive(Subcommand)]
134134
enum Commands {
135135
/// Delete one or more files from the archive
136136
#[command(name = "-d")]

dev/nm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use plib::PROJECT_NAME;
2222
use std::collections::HashMap;
2323
use std::fs;
2424

25-
#[derive(Debug, ValueEnum, Clone)]
25+
#[derive(ValueEnum, Clone)]
2626
enum OutputType {
2727
D,
2828
O,

dev/strings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
1414
use object::{Object, ObjectSection};
1515
use plib::PROJECT_NAME;
1616

17-
#[derive(Debug, Clone, Copy, ValueEnum)]
17+
#[derive(Clone, Copy, ValueEnum)]
1818
enum OffsetFormat {
1919
#[value(name = "d", help = "decimal")]
2020
Decimal,
@@ -24,7 +24,7 @@ enum OffsetFormat {
2424
Hex,
2525
}
2626

27-
#[derive(clap::Args, Clone, Copy, Debug)]
27+
#[derive(clap::Args, Clone, Copy)]
2828
struct OutputOptions {
2929
/// Scan the input files in their entirety
3030
#[arg(short = 'a')]

file/dd.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,12 @@ const CONV_ASCII_EBCDIC: [u8; 256] = [
7171
0xdd, 0xde, 0xdf, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
7272
];
7373

74-
#[derive(Debug)]
7574
enum AsciiConv {
7675
Ascii,
7776
EBCDIC,
7877
IBM,
7978
}
8079

81-
#[derive(Debug)]
8280
enum Conversion {
8381
Ascii(AsciiConv),
8482
Lcase,
@@ -89,7 +87,6 @@ enum Conversion {
8987
Sync,
9088
}
9189

92-
#[derive(Debug)]
9390
struct Config {
9491
ifile: String,
9592
ofile: String,

file/find.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::path::PathBuf;
1616
use std::{env, fs};
1717
use walkdir::{DirEntry, WalkDir};
1818

19-
#[derive(Debug, Clone)]
19+
#[derive(Clone)]
2020
enum Expr {
2121
And(Box<Expr>),
2222
Or(Box<Expr>),
@@ -38,7 +38,7 @@ enum Expr {
3838
Newer(PathBuf),
3939
}
4040

41-
#[derive(Debug, Clone)]
41+
#[derive(Clone)]
4242
enum FileType {
4343
BlockDevice,
4444
CharDevice,

m4/test-manager/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ struct Args {
1212
fixtures_directory: PathBuf,
1313
}
1414

15-
#[derive(Debug, clap::Subcommand)]
15+
#[derive(clap::Subcommand)]
1616
enum Commands {
1717
UpdateSnapshots(UpdateSnapshots),
1818
}
1919

2020
/// Update the integration test snapshots.
21-
#[derive(Debug, clap::Args)]
21+
#[derive(clap::Args)]
2222
struct UpdateSnapshots {
2323
/// Optionally specify a secific test case name that you want to update, where name is
2424
/// {name}.m4 of the test case file.

plib/src/utmpx.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use crate::platform::{self, endutxent, getutxent, setutxent};
1111
use std::ffi::CStr;
1212

13-
#[derive(Debug)]
1413
pub struct Utmpx {
1514
pub user: String,
1615
pub id: String,

text/csplit.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,12 @@ struct Args {
4545
operands: Vec<String>,
4646
}
4747

48-
#[derive(Debug)]
4948
enum Operand {
5049
Rx(Regex, isize, bool),
5150
LineNum(usize),
5251
Repeat(usize),
5352
}
5453

55-
#[derive(Debug)]
5654
struct SplitOps {
5755
ops: Vec<Operand>,
5856
}

text/cut.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use plib::PROJECT_NAME;
1515
use std::path::PathBuf;
1616

1717
/// Cut - cut out selected fields of each line of a file
18-
#[derive(Parser, Debug, Clone)]
18+
#[derive(Parser, Clone)]
1919
#[command(version, about)]
2020
struct Args {
2121
/// Cut based on a list of bytes
@@ -79,7 +79,7 @@ fn validate_args(args: &Args) -> Result<(), String> {
7979
Ok(())
8080
}
8181

82-
#[derive(Clone, Debug)]
82+
#[derive(Clone)]
8383
enum ParseVariat {
8484
Bytes(Vec<(i32, i32)>),
8585
Characters(Vec<(i32, i32)>),

text/diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory};
2828
use plib::PROJECT_NAME;
2929

3030
/// diff - compare two files
31-
#[derive(Parser, Debug, Clone)]
31+
#[derive(Parser, Clone)]
3232
#[command(version, about)]
3333
struct Args {
3434
/// Cause EOL whitespace to be treated as blanks

0 commit comments

Comments
 (0)