You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Array::shrink_to_fit(&mut self) to 53.4.0 (#6790) (#6817) (#6962)
* Add `Array::shrink_to_fit(&mut self)` (#6790)
* Add `Array::shrink_to_fit`
* Test that shrink_to_fit actually frees memory
* Make sure the buffer isn't shared in the test of shrink_to_fit
* Remove `#[inline]`
* Use `realloc` to reallocate the bytes
* Clean up test
* Improve docstring for `Array::shrink_to_fit`
Co-authored-by: Raphael Taylor-Davies <[email protected]>
* `Buffer::shrink_to_fit`: ignore shared buffers
* Improve comment in `ArrayRef::shrink_to_fit`
* Document why `try_realloc` is safe, and actually make it safe :)
* Improve testing of shrink_to_fit
* Fix a few corner cases, and improve test
* Add license header to new test file
---------
Co-authored-by: Raphael Taylor-Davies <[email protected]>
* Support shrink to empty (#6817)
* Support shrink to empty
* Docs
* Format
---------
Co-authored-by: Raphael Taylor-Davies <[email protected]>
0 commit comments