Skip to content

Commit

Permalink
rust format
Browse files Browse the repository at this point in the history
  • Loading branch information
coastalwhite committed Jul 23, 2024
1 parent e503d21 commit b4899ad
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/polars-utils/src/foreign_vec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// This is pulled out of https://github.com/DataEngineeringLabs/foreign_vec

use std::mem::ManuallyDrop;
use std::ops::DerefMut;
use std::vec::Vec;
Expand Down Expand Up @@ -66,11 +65,11 @@ impl<D, T> Drop for ForeignVec<D, T> {
match self.allocation {
Allocation::Foreign(_) => {
// the foreign is dropped via its `Drop`
}
},
Allocation::Native => {
let data = core::mem::take(&mut self.data);
let _ = ManuallyDrop::into_inner(data);
}
},
}
}
}
Expand Down

0 comments on commit b4899ad

Please sign in to comment.