haohuaijin commented on code in PR #10593:
URL: https://github.com/apache/arrow-rs/pull/10593#discussion_r3740383089
##########
arrow-buffer/src/util/bit_chunk_iterator.rs:
##########
@@ -324,7 +324,7 @@ impl<'a> BitChunks<'a> {
/// Returns an iterator over chunks of 64 bits, with the remaining bits
zero padded to 64-bits
#[inline]
- pub fn iter_padded(&self) -> impl Iterator<Item = u64> + 'a {
+ pub fn iter_padded(&self) -> impl Iterator<Item = u64> + use<'a> {
Review Comment:
`BitChunks::iter_padded` gains a + use<'a> precise-capturing annotation. The
edition 2024 migration made its RPIT implicitly capture the &self borrow, so
the returned iterator could no longer outlive the temporary `BitChunks` — even
though the body only borrows the underlying buffer ('a). The annotation
restores the edition-2021 semantics of the existing + 'a bound; it is a capture
removal, which the Cargo semver reference classifies as non-breaking. This lets
`and_then_masks` reuse `iter_padded` instead of hand-rolling the
chunk/remainder chain.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]