Skip to content

Commit

Permalink
chore: clippy::unused_self
Browse files Browse the repository at this point in the history
make clippy happy
  • Loading branch information
jqnatividad committed Feb 10, 2025
1 parent b6822ab commit f927fe3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cmd/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ struct Args {

impl Args {
fn get_column_index(
#[allow(clippy::unused_self)] &self,
header: &csv::ByteRecord,
column_spec: &str,
purpose: &str,
Expand Down Expand Up @@ -220,7 +219,7 @@ impl Args {

fn get_strata_column(&self, header: &csv::ByteRecord) -> CliResult<usize> {
match &self.flag_stratified {
Some(col) => self.get_column_index(header, col, "strata"),
Some(col) => Self::get_column_index(header, col, "strata"),
None => {
fail_incorrectusage_clierror!(
"--stratified <col> is required for stratified sampling"
Expand All @@ -231,7 +230,7 @@ impl Args {

fn get_weight_column(&self, header: &csv::ByteRecord) -> CliResult<usize> {
match &self.flag_weighted {
Some(col) => self.get_column_index(header, col, "weight"),
Some(col) => Self::get_column_index(header, col, "weight"),
None => {
fail_incorrectusage_clierror!("--weighted <col> is required for weighted sampling")
},
Expand All @@ -240,7 +239,7 @@ impl Args {

fn get_cluster_column(&self, header: &csv::ByteRecord) -> CliResult<usize> {
match &self.flag_cluster {
Some(col) => self.get_column_index(header, col, "cluster"),
Some(col) => Self::get_column_index(header, col, "cluster"),
None => {
fail_incorrectusage_clierror!("--cluster <col> is required for cluster sampling")
},
Expand Down

0 comments on commit f927fe3

Please sign in to comment.