Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pacman82 committed Nov 24, 2024
1 parent 9a9f66e commit 4b57136
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand Down
3 changes: 2 additions & 1 deletion src/odbc_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};
Expand Down
8 changes: 6 additions & 2 deletions src/reader/map_odbc_to_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ where
U: Item + 'static + Send,
{
if nullable {
Box::new(NullableStrategy::<Self, U, _>::new(OkWrappedMapped(odbc_to_arrow)))
Box::new(NullableStrategy::<Self, U, _>::new(OkWrappedMapped(
odbc_to_arrow,
)))
} else {
Box::new(NonNullableStrategy::<Self, U, _>::new(OkWrappedMapped(odbc_to_arrow)))
Box::new(NonNullableStrategy::<Self, U, _>::new(OkWrappedMapped(
odbc_to_arrow,
)))
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/reader/odbc_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit 4b57136

Please sign in to comment.