Skip to content

Commit

Permalink
docs[rust] fix some minor typos (#4763)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Sep 7, 2022
1 parent ca7cda5 commit da7d469
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion polars/polars-core/src/chunked_array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl<T: PolarsDataType> ChunkedArray<T> {
self.iter_validities().any(|valid| valid.is_some())
}

/// Shrink the capacity of this array to fit it's length.
/// Shrink the capacity of this array to fit its length.
pub fn shrink_to_fit(&mut self) {
self.chunks = vec![arrow::compute::concatenate::concatenate(
self.chunks
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/chunked_array/ops/extend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ where
{
/// Extend the memory backed by this array with the values from `other`.
///
/// Different from [`ChunkedArray::append`] which adds chunks to this [`ChunkedArray`] `extent`
/// Different from [`ChunkedArray::append`] which adds chunks to this [`ChunkedArray`] `extend`
/// appends the data from `other` to the underlying `PrimitiveArray` and thus may cause a reallocation.
///
/// However if this does not cause a reallocation, the resulting data structure will not have any extra chunks
Expand Down
4 changes: 2 additions & 2 deletions polars/polars-core/src/frame/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ impl DataFrame {
DataFrame::new_no_checks(cols)
}

/// Shrink the capacity of this DataFrame to fit it's length.
/// Shrink the capacity of this DataFrame to fit its length.
pub fn shrink_to_fit(&mut self) {
// Don't parallelize this. Memory overhead
for s in &mut self.columns {
Expand Down Expand Up @@ -938,7 +938,7 @@ impl DataFrame {
/// Extend the memory backed by this [`DataFrame`] with the values from `other`.
///
/// Different from [`vstack`](Self::vstack) which adds the chunks from `other` to the chunks of this [`DataFrame`]
/// `extent` appends the data from `other` to the underlying memory locations and thus may cause a reallocation.
/// `extend` appends the data from `other` to the underlying memory locations and thus may cause a reallocation.
///
/// If this does not cause a reallocation, the resulting data structure will not have any extra chunks
/// and thus will yield faster queries.
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/series/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl Series {
self
}

/// Shrink the capacity of this array to fit it's length.
/// Shrink the capacity of this array to fit its length.
pub fn shrink_to_fit(&mut self) {
self._get_inner_mut().shrink_to_fit()
}
Expand Down
2 changes: 1 addition & 1 deletion polars/polars-core/src/series/series_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pub trait SeriesTrait:
self.chunks().len()
}

/// Shrink the capacity of this array to fit it's length.
/// Shrink the capacity of this array to fit its length.
fn shrink_to_fit(&mut self) {
panic!("shrink to fit not supported for dtype {:?}", self.dtype())
}
Expand Down

0 comments on commit da7d469

Please sign in to comment.