alamb commented on code in PR #8853:
URL: https://github.com/apache/arrow-rs/pull/8853#discussion_r2533719417
##########
arrow-buffer/src/buffer/immutable.rs:
##########
@@ -364,6 +364,23 @@ impl Buffer {
/// Returns `Err` if this is shared or its allocation is from an external
source or
/// it is not allocated with alignment [`ALIGNMENT`]
///
+ /// # Example: Creating a [`MutableBuffer`] from a [`Buffer`]
+ /// ```
+ /// # use arrow_buffer::buffer::{Buffer, MutableBuffer};
+ /// let buffer: Buffer = Buffer::from(&[1u8, 2, 3, 4][..]);
Review Comment:
Yeah I should probably make that more clear -- personally find the `let
buffer = Buffer::from(foo)` syntax easier to understand than `let buffer:
Buffer = foo.into()` (it looks more like a constructor to me), but really there
is no concrete difference between the two syntaxes.
--
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]