diff --git a/src/date_time.rs b/src/date_time.rs index 98a695f..feff910 100644 --- a/src/date_time.rs +++ b/src/date_time.rs @@ -82,7 +82,7 @@ pub fn epoch_to_timestamp_ns(from: i64) -> Timestamp { pub fn epoch_to_timestamp_us(from: i64) -> Timestamp { let ndt = - DateTime::from_timestamp_micros(from ).expect("Timestamp must be in range for microseconds"); + DateTime::from_timestamp_micros(from).expect("Timestamp must be in range for microseconds"); datetime_to_timestamp(ndt) } @@ -93,7 +93,8 @@ pub fn epoch_to_timestamp_ms(from: i64) -> Timestamp { } pub fn epoch_to_timestamp_s(from: i64) -> Timestamp { - let ndt = DateTime::from_timestamp_millis(from * 1_000).expect("Timestamp must be in range for milliseconds"); + let ndt = DateTime::from_timestamp_millis(from * 1_000) + .expect("Timestamp must be in range for milliseconds"); datetime_to_timestamp(ndt) } diff --git a/src/odbc_writer.rs b/src/odbc_writer.rs index f2a78e5..32e883e 100644 --- a/src/odbc_writer.rs +++ b/src/odbc_writer.rs @@ -21,7 +21,8 @@ use odbc_api::{ use crate::{ date_time::{ - epoch_to_date, epoch_to_timestamp_s, epoch_to_timestamp_ms, epoch_to_timestamp_ns, epoch_to_timestamp_us, sec_since_midnight_to_time, NullableTimeAsText + epoch_to_date, epoch_to_timestamp_ms, epoch_to_timestamp_ns, epoch_to_timestamp_s, + epoch_to_timestamp_us, sec_since_midnight_to_time, NullableTimeAsText, }, decimal::{NullableDecimal128AsText, NullableDecimal256AsText}, }; diff --git a/src/reader/map_odbc_to_arrow.rs b/src/reader/map_odbc_to_arrow.rs index 22379a5..fbe0a19 100644 --- a/src/reader/map_odbc_to_arrow.rs +++ b/src/reader/map_odbc_to_arrow.rs @@ -73,9 +73,13 @@ where U: Item + 'static + Send, { if nullable { - Box::new(NullableStrategy::::new(OkWrappedMapped(odbc_to_arrow))) + Box::new(NullableStrategy::::new(OkWrappedMapped( + odbc_to_arrow, + ))) } else { - Box::new(NonNullableStrategy::::new(OkWrappedMapped(odbc_to_arrow))) + Box::new(NonNullableStrategy::::new(OkWrappedMapped( + odbc_to_arrow, + ))) } } diff --git a/src/reader/odbc_reader.rs b/src/reader/odbc_reader.rs index 223927e..3d238bc 100644 --- a/src/reader/odbc_reader.rs +++ b/src/reader/odbc_reader.rs @@ -372,7 +372,7 @@ impl OdbcReaderBuilder { self.schema.clone(), buffer_allocation_options, self.map_value_errors_to_null, - self.trim_fixed_sized_character_strings + self.trim_fixed_sized_character_strings, )?; let bytes_per_row = converter.row_size_in_bytes(); let buffer_size_in_rows = self.buffer_size_in_rows(bytes_per_row)?;