diff --git a/arrow-pyarrow-integration-testing/src/lib.rs b/arrow-pyarrow-integration-testing/src/lib.rs index 0f6bdf8e2f7..a493c909142 100644 --- a/arrow-pyarrow-integration-testing/src/lib.rs +++ b/arrow-pyarrow-integration-testing/src/lib.rs @@ -152,14 +152,8 @@ fn round_trip_field(array: PyObject, py: Python) -> PyResult { to_py_field(&field, py) } -#[pyfunction] -fn total_allocated_bytes() -> PyResult { - Ok(arrow2::total_allocated_bytes()) -} - #[pymodule] fn arrow_pyarrow_integration_testing(_py: Python, m: &PyModule) -> PyResult<()> { - m.add_function(wrap_pyfunction!(total_allocated_bytes, m)?)?; m.add_function(wrap_pyfunction!(round_trip_array, m)?)?; m.add_function(wrap_pyfunction!(round_trip_field, m)?)?; Ok(()) diff --git a/arrow-pyarrow-integration-testing/tests/test_sql.py b/arrow-pyarrow-integration-testing/tests/test_sql.py index 5a6da2bdf65..2998e27a0b0 100644 --- a/arrow-pyarrow-integration-testing/tests/test_sql.py +++ b/arrow-pyarrow-integration-testing/tests/test_sql.py @@ -33,18 +33,9 @@ def __reduce__(self): class TestCase(unittest.TestCase): def setUp(self): - self.old_allocated_rust = ( - arrow_pyarrow_integration_testing.total_allocated_bytes() - ) self.old_allocated_cpp = pyarrow.total_allocated_bytes() def tearDown(self): - # No leak of Rust - self.assertEqual( - self.old_allocated_rust, - arrow_pyarrow_integration_testing.total_allocated_bytes(), - ) - # No leak of C++ memory self.assertEqual(self.old_allocated_cpp, pyarrow.total_allocated_bytes()) diff --git a/src/buffer/mutable.rs b/src/buffer/mutable.rs index 6fb1bc08460..c5cfa795ff2 100644 --- a/src/buffer/mutable.rs +++ b/src/buffer/mutable.rs @@ -233,7 +233,7 @@ impl MutableBuffer { /// buffer.push(2); /// /// buffer.shrink_to_fit(); - /// assert!(buffer.capacity() == 8); + /// assert!(buffer.capacity() == 2); /// ``` pub fn shrink_to_fit(&mut self) { self.data.shrink_to_fit();