diff --git a/dev/ar.rs b/dev/ar.rs index e061aec81..d1bd164dd 100644 --- a/dev/ar.rs +++ b/dev/ar.rs @@ -16,7 +16,7 @@ use std::os::unix::ffi::{OsStrExt, OsStringExt}; use std::os::unix::fs::MetadataExt; use std::path::Path; -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] #[group(required = false, multiple = false)] struct InsertArgs { /// Insert the files after the specified member @@ -28,7 +28,7 @@ struct InsertArgs { insert_before: bool, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct DeleteArgs { /// Give verbose output #[arg(short = 'v')] @@ -38,7 +38,7 @@ struct DeleteArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct MoveArgs { #[command(flatten)] insert_args: InsertArgs, @@ -46,7 +46,7 @@ struct MoveArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct PrintArgs { /// Give verbose output #[arg(short = 'v')] @@ -60,7 +60,7 @@ struct PrintArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct QuickAppendArgs { /// Suppress archive creation diagnostics #[arg(short = 'c')] @@ -74,7 +74,7 @@ struct QuickAppendArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct ReplaceArgs { /// Suppress archive creation diagnostics #[arg(short = 'c')] @@ -94,7 +94,7 @@ struct ReplaceArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct ListArgs { /// Give verbose output #[arg(short = 'v')] @@ -108,7 +108,7 @@ struct ListArgs { files: Vec, } -#[derive(clap::Args, Debug)] +#[derive(clap::Args)] struct ExtractArgs { /// Give verbose output #[arg(short = 'v')] @@ -130,7 +130,7 @@ struct ExtractArgs { files: Vec, } -#[derive(Subcommand, Debug)] +#[derive(Subcommand)] enum Commands { /// Delete one or more files from the archive #[command(name = "-d")] diff --git a/dev/nm.rs b/dev/nm.rs index 0db8eb32c..ebae7ad8d 100644 --- a/dev/nm.rs +++ b/dev/nm.rs @@ -22,7 +22,7 @@ use plib::PROJECT_NAME; use std::collections::HashMap; use std::fs; -#[derive(Debug, ValueEnum, Clone)] +#[derive(ValueEnum, Clone)] enum OutputType { D, O, diff --git a/dev/strings.rs b/dev/strings.rs index 0662bc17d..7666cb325 100644 --- a/dev/strings.rs +++ b/dev/strings.rs @@ -14,7 +14,7 @@ use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory}; use object::{Object, ObjectSection}; use plib::PROJECT_NAME; -#[derive(Debug, Clone, Copy, ValueEnum)] +#[derive(Clone, Copy, ValueEnum)] enum OffsetFormat { #[value(name = "d", help = "decimal")] Decimal, @@ -24,7 +24,7 @@ enum OffsetFormat { Hex, } -#[derive(clap::Args, Clone, Copy, Debug)] +#[derive(clap::Args, Clone, Copy)] struct OutputOptions { /// Scan the input files in their entirety #[arg(short = 'a')] diff --git a/file/dd.rs b/file/dd.rs index 78a535465..9da7a9dc6 100644 --- a/file/dd.rs +++ b/file/dd.rs @@ -71,14 +71,12 @@ const CONV_ASCII_EBCDIC: [u8; 256] = [ 0xdd, 0xde, 0xdf, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, ]; -#[derive(Debug)] enum AsciiConv { Ascii, EBCDIC, IBM, } -#[derive(Debug)] enum Conversion { Ascii(AsciiConv), Lcase, @@ -89,7 +87,6 @@ enum Conversion { Sync, } -#[derive(Debug)] struct Config { ifile: String, ofile: String, diff --git a/file/find.rs b/file/find.rs index 973c31588..bafa20eea 100644 --- a/file/find.rs +++ b/file/find.rs @@ -16,7 +16,7 @@ use std::path::PathBuf; use std::{env, fs}; use walkdir::{DirEntry, WalkDir}; -#[derive(Debug, Clone)] +#[derive(Clone)] enum Expr { And(Box), Or(Box), @@ -38,7 +38,7 @@ enum Expr { Newer(PathBuf), } -#[derive(Debug, Clone)] +#[derive(Clone)] enum FileType { BlockDevice, CharDevice, diff --git a/m4/test-manager/src/main.rs b/m4/test-manager/src/main.rs index 264b912a6..d35535fc3 100644 --- a/m4/test-manager/src/main.rs +++ b/m4/test-manager/src/main.rs @@ -12,13 +12,13 @@ struct Args { fixtures_directory: PathBuf, } -#[derive(Debug, clap::Subcommand)] +#[derive(clap::Subcommand)] enum Commands { UpdateSnapshots(UpdateSnapshots), } /// Update the integration test snapshots. -#[derive(Debug, clap::Args)] +#[derive(clap::Args)] struct UpdateSnapshots { /// Optionally specify a secific test case name that you want to update, where name is /// {name}.m4 of the test case file. diff --git a/plib/src/utmpx.rs b/plib/src/utmpx.rs index 28da62780..271e57e42 100644 --- a/plib/src/utmpx.rs +++ b/plib/src/utmpx.rs @@ -10,7 +10,6 @@ use crate::platform::{self, endutxent, getutxent, setutxent}; use std::ffi::CStr; -#[derive(Debug)] pub struct Utmpx { pub user: String, pub id: String, diff --git a/text/csplit.rs b/text/csplit.rs index feedde2a4..86e7428c5 100644 --- a/text/csplit.rs +++ b/text/csplit.rs @@ -45,14 +45,12 @@ struct Args { operands: Vec, } -#[derive(Debug)] enum Operand { Rx(Regex, isize, bool), LineNum(usize), Repeat(usize), } -#[derive(Debug)] struct SplitOps { ops: Vec, } diff --git a/text/cut.rs b/text/cut.rs index 3b4cc5cb8..8fe8e068b 100644 --- a/text/cut.rs +++ b/text/cut.rs @@ -15,7 +15,7 @@ use plib::PROJECT_NAME; use std::path::PathBuf; /// Cut - cut out selected fields of each line of a file -#[derive(Parser, Debug, Clone)] +#[derive(Parser, Clone)] #[command(version, about)] struct Args { /// Cut based on a list of bytes @@ -79,7 +79,7 @@ fn validate_args(args: &Args) -> Result<(), String> { Ok(()) } -#[derive(Clone, Debug)] +#[derive(Clone)] enum ParseVariat { Bytes(Vec<(i32, i32)>), Characters(Vec<(i32, i32)>), diff --git a/text/diff.rs b/text/diff.rs index 34383a932..07c8543f2 100644 --- a/text/diff.rs +++ b/text/diff.rs @@ -28,7 +28,7 @@ use gettextrs::{bind_textdomain_codeset, setlocale, textdomain, LocaleCategory}; use plib::PROJECT_NAME; /// diff - compare two files -#[derive(Parser, Debug, Clone)] +#[derive(Parser, Clone)] #[command(version, about)] struct Args { /// Cause EOL whitespace to be treated as blanks diff --git a/text/diff_util/common.rs b/text/diff_util/common.rs index 0b0121c13..f4996efe2 100755 --- a/text/diff_util/common.rs +++ b/text/diff_util/common.rs @@ -1,18 +1,16 @@ -#[derive(Debug)] -pub struct FormatOptions { - pub ignore_trailing_white_spaces: bool, - pub output_format: OutputFormat, - pub label1: Option, - pub label2: Option, -} - -#[derive(Debug)] -#[allow(dead_code)] -pub enum OutputFormat { - Debug, - Default, - Context(usize), - EditScript, - ForwardEditScript, - Unified(usize), -} +pub struct FormatOptions { + pub ignore_trailing_white_spaces: bool, + pub output_format: OutputFormat, + pub label1: Option, + pub label2: Option, +} + +#[allow(dead_code)] +pub enum OutputFormat { + Debug, + Default, + Context(usize), + EditScript, + ForwardEditScript, + Unified(usize), +} diff --git a/text/diff_util/file_data.rs b/text/diff_util/file_data.rs index 5554b59fd..364c7182b 100755 --- a/text/diff_util/file_data.rs +++ b/text/diff_util/file_data.rs @@ -7,7 +7,6 @@ use std::{ use super::{change::Change, constants::COULD_NOT_UNWRAP_FILENAME}; -#[derive(Debug)] pub struct FileData { path: PathBuf, lines: Vec, diff --git a/text/diff_util/file_diff.rs b/text/diff_util/file_diff.rs index 3e6e16136..ae5577083 100755 --- a/text/diff_util/file_diff.rs +++ b/text/diff_util/file_diff.rs @@ -22,7 +22,6 @@ use std::{ path::PathBuf, }; -#[derive(Debug)] pub struct FileDiff<'a> { file1: &'a mut FileData, file2: &'a mut FileData, diff --git a/text/diff_util/hunks.rs b/text/diff_util/hunks.rs index 659a5c532..6f5d64bd6 100755 --- a/text/diff_util/hunks.rs +++ b/text/diff_util/hunks.rs @@ -2,7 +2,7 @@ use crate::diff_util::constants::NO_NEW_LINE_AT_END_OF_FILE; use super::{change::Change, file_data::FileData}; -#[derive(Clone, Debug)] +#[derive(Clone)] pub struct Hunk { kind: Change, changes: Vec, @@ -318,7 +318,6 @@ impl Hunk { } } -#[derive(Debug)] pub struct Hunks { hunks: Vec, } diff --git a/text/fold.rs b/text/fold.rs index c9472b91a..4f2bc35be 100644 --- a/text/fold.rs +++ b/text/fold.rs @@ -16,7 +16,7 @@ use std::path::PathBuf; const TABSTOP: usize = 8; /// fold - filter for folding lines -#[derive(Parser, Debug, Clone)] +#[derive(Parser, Clone)] #[command(version, about)] struct Args { /// Count width in bytes rather than column positions. diff --git a/text/nl.rs b/text/nl.rs index 0b779c021..f0a376c35 100644 --- a/text/nl.rs +++ b/text/nl.rs @@ -93,7 +93,7 @@ struct Args { file: Option, } -#[derive(Debug, Clone)] +#[derive(Clone)] enum LineNumberingStyle { All, NonEmpty, @@ -137,7 +137,7 @@ impl std::fmt::Display for LineNumberingStyle { } } -#[derive(Debug, Clone, ValueEnum)] +#[derive(Clone, ValueEnum)] enum NumberFormat { Ln, Rn, diff --git a/text/pr_util/args.rs b/text/pr_util/args.rs index fc9c54c78..7f2c15888 100644 --- a/text/pr_util/args.rs +++ b/text/pr_util/args.rs @@ -259,7 +259,7 @@ fn parse_separator(s: &str) -> Result { macro_rules! impl_char_and_number { ($t:tt, $option:expr, $default_chr:expr, $default_num:expr) => { - #[derive(Debug, Clone)] + #[derive(Clone)] pub struct $t { chr: char, num: usize, diff --git a/text/tail.rs b/text/tail.rs index 133e7c38f..53ee89a0d 100644 --- a/text/tail.rs +++ b/text/tail.rs @@ -14,7 +14,7 @@ use std::time::Duration; /// /// The `SignedIsize` struct is a simple wrapper around the `isize` type, designed to parse /// a string into an `isize` value that defaults to negative if no explicit sign is provided. -#[derive(Debug, Clone)] +#[derive(Clone)] struct SignedIsize(isize); impl FromStr for SignedIsize { diff --git a/text/tr.rs b/text/tr.rs index d3033f4dc..fb564a2e9 100644 --- a/text/tr.rs +++ b/text/tr.rs @@ -60,7 +60,7 @@ impl Args { } // The Char struct represents a character along with its repetition count. -#[derive(Debug, Clone)] +#[derive(Clone)] struct Char { // The character. char: char, @@ -69,14 +69,14 @@ struct Char { } // The Equiv struct represents a character equivalent. -#[derive(Debug, Clone)] +#[derive(Clone)] struct Equiv { // The character equivalent. char: char, } // The Operand enum can be either a Char or an Equiv -#[derive(Debug, Clone)] +#[derive(Clone)] enum Operand { Char(Char), Equiv(Equiv), @@ -420,7 +420,7 @@ fn parse_symbols(input: &str) -> Result, String> { } /// Represents the case sensitivity of character classes. -#[derive(Debug, PartialEq)] +#[derive(PartialEq)] enum CaseSensitive { UpperCase, LowerCase, diff --git a/xform/uudecode.rs b/xform/uudecode.rs index 030183111..10aa218c9 100644 --- a/xform/uudecode.rs +++ b/xform/uudecode.rs @@ -34,14 +34,12 @@ struct Args { file: Option, } -#[derive(Debug)] enum DecodingType { Historical, Base64, } -#[derive(Debug)] struct Header { dec_type: DecodingType,