fix warning

This commit is contained in:
JIe 2024-11-21 10:15:07 +08:00
parent 1707b02b27
commit 1844585619
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ use clap::Parser;
use cli::App; use cli::App;
use csv::{ErrorKind, ReaderBuilder}; use csv::{ErrorKind, ReaderBuilder};
use std::{ use std::{
io::{self, BufRead, BufWriter, IsTerminal, Read}, io::{self, BufWriter, IsTerminal},
process, process,
}; };
use table::TablePrinter; use table::TablePrinter;

View File

@ -31,7 +31,7 @@ fn take(reader: &mut Vec<String>, start_index: u32, end_index: u32) -> Vec<Strin
body.push(header); body.push(header);
if end_index == 0{ if end_index == 0{
body.append(&mut reader[start_index as usize..].to_owned()); body.append(&mut reader[start_index as usize..].to_owned());
}else if(end_index < reader.len() as u32){ }else if end_index < reader.len() as u32{
body.append(&mut reader[start_index as usize..end_index as usize].to_owned()); body.append(&mut reader[start_index as usize..end_index as usize].to_owned());
}else { }else {
body.append(&mut reader[start_index as usize..].to_owned()); body.append(&mut reader[start_index as usize..].to_owned());