Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Dec 17, 2021
1 parent ed51b0e commit 84892a3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion polars/polars-core/src/chunked_array/temporal/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl DatetimeChunked {
#[cfg(test)]
mod test {
use crate::prelude::*;
use chrono::NaiveDateTime;
use polars_time::export::chrono::NaiveDateTime;

#[test]
fn from_datetime() {
Expand Down
3 changes: 2 additions & 1 deletion polars/polars-core/src/doc/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
//!
//! ```rust
//! use polars_core::prelude::*;
//! use chrono::NaiveDateTime;
//! // don't use this in your code, use chrono directly!
//! use polars_core::export::chrono::NaiveDateTime;
//!
//! // String values to parse, Note that the 2nd value is not a correct time value.
//! let datetime_values = &[
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-lazy/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::logical_plan::optimizer::stack_opt::{OptimizationRule, StackOptimizer
use crate::prelude::*;
use polars_core::chunked_array::builder::get_list_builder;
#[cfg(feature = "temporal")]
use polars_core::utils::chrono::{NaiveDate, NaiveDateTime, NaiveTime};
use polars_core::export::chrono::{NaiveDate, NaiveDateTime, NaiveTime};
use polars_core::{df, prelude::*};
use std::iter::FromIterator;

Expand Down
1 change: 1 addition & 0 deletions polars/polars-time/src/duration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ impl Duration {
}

// Truncate the given nanoseconds timestamp by the window boundary.
#[inline]
pub fn truncate_nanoseconds(&self, t: i64) -> i64 {
match (self.months, self.nsecs) {
(0, 0) => panic!("duration may not be zero"),
Expand Down
1 change: 0 additions & 1 deletion polars/polars-time/src/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use crate::bounds::Bounds;
use crate::calendar::{date_range, timestamp_ns_to_datetime};
use crate::duration::Duration;
use crate::groupby::{groupby, ClosedWindow, GroupTuples};
Expand Down
1 change: 1 addition & 0 deletions polars/polars-time/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ impl Window {
}
}

#[inline]
pub fn truncate(&self, t: TimeNanoseconds) -> TimeNanoseconds {
self.every.truncate_nanoseconds(t) + self.offset
}
Expand Down

0 comments on commit 84892a3

Please sign in to comment.