Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Apr 7, 2022
1 parent 28511d1 commit 74b46f5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/io/csv/write/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use super::super::super::iterator::{BufStreamingIterator, StreamingIterator};
use crate::array::{DictionaryArray, DictionaryKey, Offset};
use csv_core::WriteResult;
use std::any::Any;
use std::fmt::{Debug, Formatter, Write};
use std::fmt::{Debug, Write};

/// Options to serialize logical types to CSV
/// The default is to format times and dates as `chrono` crate formats them.
Expand Down Expand Up @@ -50,7 +50,7 @@ impl Default for SerializeOptions {
}
}

/// Utility to write to `&muy Vec<u8>` buffer
/// Utility to write to `&mut Vec<u8>` buffer
struct StringWrap<'a>(pub &'a mut Vec<u8>);

impl<'a> Write for StringWrap<'a> {
Expand Down Expand Up @@ -93,7 +93,7 @@ macro_rules! dyn_date {
move |x, buf| {
if let Some(x) = x {
let dt = ($fn)(*x).format(format);
write!(StringWrap(buf), "{}", dt);
let _ = write!(StringWrap(buf), "{}", dt);
}
},
vec![],
Expand All @@ -104,7 +104,7 @@ macro_rules! dyn_date {
move |x, buf| {
if let Some(x) = x {
let dt = ($fn)(*x);
write!(StringWrap(buf), "{}", dt);
let _ = write!(StringWrap(buf), "{}", dt);
}
},
vec![],
Expand All @@ -125,7 +125,7 @@ fn timestamp_with_tz_default<'a>(
move |x, buf| {
if let Some(x) = x {
let dt = temporal_conversions::timestamp_to_datetime(*x, time_unit, &timezone);
write!(StringWrap(buf), "{}", dt);
let _ = write!(StringWrap(buf), "{}", dt);
}
},
vec![],
Expand All @@ -139,7 +139,7 @@ fn timestamp_with_tz_default<'a>(
if let Some(x) = x {
let dt =
temporal_conversions::timestamp_to_datetime(*x, time_unit, &timezone);
write!(StringWrap(buf), "{}", dt);
let _ = write!(StringWrap(buf), "{}", dt);
}
},
vec![],
Expand Down Expand Up @@ -169,7 +169,7 @@ fn timestamp_with_tz_with_format<'a>(
if let Some(x) = x {
let dt = temporal_conversions::timestamp_to_datetime(*x, time_unit, &timezone)
.format(format);
write!(StringWrap(buf), "{}", dt);
let _ = write!(StringWrap(buf), "{}", dt);
}
},
vec![],
Expand Down

0 comments on commit 74b46f5

Please sign in to comment.