-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clippy lint dead_code
#1324
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -911,6 +911,7 @@ fn parse_decimal_with_parameter(s: &str, precision: usize, scale: usize) -> Resu | |
|
||
// Parse the string format decimal value to i128 format without checking the precision and scale. | ||
// Like "125.12" to 12512_i128. | ||
#[cfg(test)] | ||
fn parse_decimal(s: &str) -> Result<i128> { | ||
if PARSE_DECIMAL_RE.is_match(s) { | ||
let mut offset = s.len(); | ||
|
@@ -1055,6 +1056,7 @@ pub struct ReaderBuilder { | |
/// The default batch size when using the `ReaderBuilder` is 1024 records | ||
batch_size: usize, | ||
/// The bounds over which to scan the reader. `None` starts from 0 and runs until EOF. | ||
#[allow(dead_code)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a bug? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me it looks more like an omission in the builder. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
bounds: Bounds, | ||
/// Optional projection for which columns to load (zero-based column indices) | ||
projection: Option<Vec<usize>>, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,7 @@ pub struct Writer<W: Write> { | |
/// The object to write to | ||
writer: csv_crate::Writer<W>, | ||
/// Column delimiter. Defaults to `b','` | ||
#[allow(dead_code)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems a bug (not to use the delimiter option) . I think we should add a note or fix. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, this time the delimiter is configured via the builder, but gets completely ignored impl<W: Write> Writer<W> {
/// Create a new CsvWriter from a writable object, with default options
pub fn new(writer: W) -> Self {
let delimiter = b',';
let mut builder = csv_crate::WriterBuilder::new();
let writer = builder.delimiter(delimiter).from_writer(writer);
... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
delimiter: u8, | ||
/// Whether file should be written with headers. Defaults to `true` | ||
has_headers: bool, | ||
|
@@ -107,6 +108,7 @@ pub struct Writer<W: Write> { | |
/// The timestamp format for timestamp arrays | ||
timestamp_format: String, | ||
/// The timestamp format for timestamp (with timezone) arrays | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fyi @sum12 |
||
#[allow(dead_code)] | ||
timestamp_tz_format: String, | ||
/// The time format for time arrays | ||
time_format: String, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 nice fix