From 3f9f47a34a1e243a47bd8b6969f6015892553531 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 26 Oct 2024 09:24:54 -0400 Subject: [PATCH] Update comments now that a std API is stable, but too high MSRV --- src/buffer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer.rs b/src/buffer.rs index 85144f6ff99..2d94681a5c7 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -191,14 +191,14 @@ impl FromPyObject<'_> for PyBuffer { impl PyBuffer { /// Gets the underlying buffer from the specified python object. pub fn get(obj: &Bound<'_, PyAny>) -> PyResult> { - // TODO: use nightly API Box::new_uninit() once stable + // TODO: use nightly API Box::new_uninit() once our MSRV is 1.82 let mut buf = Box::new(mem::MaybeUninit::uninit()); let buf: Box = { err::error_on_minusone(obj.py(), unsafe { ffi::PyObject_GetBuffer(obj.as_ptr(), buf.as_mut_ptr(), ffi::PyBUF_FULL_RO) })?; // Safety: buf is initialized by PyObject_GetBuffer. - // TODO: use nightly API Box::assume_init() once stable + // TODO: use nightly API Box::assume_init() once our MSRV is 1.82 unsafe { mem::transmute(buf) } }; // Create PyBuffer immediately so that if validation checks fail, the PyBuffer::drop code