Skip to content

Commit

Permalink
clippy and format
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Oct 24, 2024
1 parent 3eae041 commit c830c6c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/polars-lazy/src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,14 +711,15 @@ impl LazyFrame {
/// .collect()
/// }
/// ```
pub fn collect(mut self) -> PolarsResult<DataFrame> {
pub fn collect(self) -> PolarsResult<DataFrame> {
#[cfg(feature = "new_streaming")]
{
if let Some(df) = self.try_new_streaming_if_requested(SinkType::Memory) {
let mut slf = self;
if let Some(df) = slf.try_new_streaming_if_requested(SinkType::Memory) {
return Ok(df?.unwrap());
}

let mut alp_plan = self.to_alp_optimized()?;
let mut alp_plan = slf.to_alp_optimized()?;
let mut physical_plan = create_physical_plan(
alp_plan.lp_top,
&mut alp_plan.lp_arena,
Expand Down Expand Up @@ -925,7 +926,10 @@ impl LazyFrame {
fn sink(mut self, payload: SinkType, msg_alternative: &str) -> Result<(), PolarsError> {
#[cfg(feature = "new_streaming")]
{
if self.try_new_streaming_if_requested(payload.clone()).is_some() {
if self
.try_new_streaming_if_requested(payload.clone())
.is_some()
{
return Ok(());
}
}
Expand Down

0 comments on commit c830c6c

Please sign in to comment.