mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-04 15:07:47 +00:00
refactor/polish ~ fix cargo clippy
complaints ('better' match indirection)
This commit is contained in:
parent
ab87a1ab5f
commit
8c97f0eebb
1 changed files with 6 additions and 6 deletions
|
@ -317,9 +317,9 @@ impl<'a> State<'a> {
|
||||||
for line1 in &self.seq {
|
for line1 in &self.seq {
|
||||||
for line2 in &other.seq {
|
for line2 in &other.seq {
|
||||||
if repr.uses_format() {
|
if repr.uses_format() {
|
||||||
repr.print_format(|spec| match spec {
|
repr.print_format(|spec| match *spec {
|
||||||
&Spec::Key => key,
|
Spec::Key => key,
|
||||||
&Spec::Field(file_num, field_num) => {
|
Spec::Field(file_num, field_num) => {
|
||||||
if file_num == self.file_num {
|
if file_num == self.file_num {
|
||||||
return line1.get_field(field_num);
|
return line1.get_field(field_num);
|
||||||
}
|
}
|
||||||
|
@ -423,9 +423,9 @@ impl<'a> State<'a> {
|
||||||
|
|
||||||
fn print_line(&self, line: &Line, repr: &Repr) {
|
fn print_line(&self, line: &Line, repr: &Repr) {
|
||||||
if repr.uses_format() {
|
if repr.uses_format() {
|
||||||
repr.print_format(|spec| match spec {
|
repr.print_format(|spec| match *spec {
|
||||||
&Spec::Key => line.get_field(self.key),
|
Spec::Key => line.get_field(self.key),
|
||||||
&Spec::Field(file_num, field_num) => if file_num == self.file_num {
|
Spec::Field(file_num, field_num) => if file_num == self.file_num {
|
||||||
line.get_field(field_num)
|
line.get_field(field_num)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue