nevi-me commented on a change in pull request #9318:
URL: https://github.com/apache/arrow/pull/9318#discussion_r564017139



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -1103,7 +1097,48 @@ impl Buffer {
             "Trusted iterator length was not accurately reported"
         );
         buffer.len = len;
-        Ok(buffer.into())
+        Ok(buffer)
+    }
+}
+
+impl Buffer {
+    /// Creates a [`Buffer`] from an [`Iterator`] with a trusted (upper) 
length.
+    /// Prefer this to `collect` whenever possible, as it is faster ~60% 
faster.

Review comment:
       ```suggestion
       /// Prefer this to `collect` whenever possible, as it is ~60% faster.
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to