From 5079972ba674ede5517cab8cc88c17ccb18152a6 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Sun, 30 May 2021 20:41:53 -0500 Subject: [PATCH] refactor/nl ~ polish spelling (comments, names, and exceptions) --- src/uu/nl/src/helper.rs | 4 ++-- src/uu/nl/src/nl.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/uu/nl/src/helper.rs b/src/uu/nl/src/helper.rs index e31477c62..562cdeb93 100644 --- a/src/uu/nl/src/helper.rs +++ b/src/uu/nl/src/helper.rs @@ -29,7 +29,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) -> // This vector holds error messages encountered. let mut errs: Vec = vec![]; settings.renumber = !opts.is_present(options::NO_RENUMBER); - match opts.value_of(options::NUMER_SEPARATOR) { + match opts.value_of(options::NUMBER_SEPARATOR) { None => {} Some(val) => { settings.number_separator = val.to_owned(); @@ -118,7 +118,7 @@ pub fn parse_options(settings: &mut crate::Settings, opts: &clap::ArgMatches) -> } } } - match opts.value_of(options::STARTING_LINE_NUMER) { + match opts.value_of(options::STARTING_LINE_NUMBER) { None => {} Some(val) => { let conv: Option = val.parse().ok(); diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index 7c5f01811..69adbed41 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -79,8 +79,8 @@ pub mod options { pub const JOIN_BLANK_LINES: &str = "join-blank-lines"; pub const NUMBER_FORMAT: &str = "number-format"; pub const NO_RENUMBER: &str = "no-renumber"; - pub const NUMER_SEPARATOR: &str = "number-separator"; - pub const STARTING_LINE_NUMER: &str = "starting-line-number"; + pub const NUMBER_SEPARATOR: &str = "number-separator"; + pub const STARTING_LINE_NUMBER: &str = "starting-line-number"; pub const NUMBER_WIDTH: &str = "number-width"; } @@ -150,16 +150,16 @@ pub fn uumain(args: impl uucore::Args) -> i32 { .help("do not reset line numbers at logical pages"), ) .arg( - Arg::with_name(options::NUMER_SEPARATOR) + Arg::with_name(options::NUMBER_SEPARATOR) .short("s") - .long(options::NUMER_SEPARATOR) + .long(options::NUMBER_SEPARATOR) .help("add STRING after (possible) line number") .value_name("STRING"), ) .arg( - Arg::with_name(options::STARTING_LINE_NUMER) + Arg::with_name(options::STARTING_LINE_NUMBER) .short("v") - .long(options::STARTING_LINE_NUMER) + .long(options::STARTING_LINE_NUMBER) .help("first line number on each logical page") .value_name("NUMBER"), )