-
Notifications
You must be signed in to change notification settings - Fork 866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add get_{ref, mut} to arrow_ipc Reader and Writer #4122
Conversation
Signed-off-by: Yilin Chen <sticnarf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great 👍 thanks @sticnarf for your contribution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, my only concern is that get_mut might cause users to rely on implicit behaviour of the outer types (e.g. when they flush, etc...) but the "inadvisable" comment hopefully protects us against this
|
||
/// Gets a mutable reference to the underlying reader. | ||
/// | ||
/// It is inadvisable to directly read from the underlying reader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
/// | ||
/// It is inadvisable to directly read from the underlying reader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | |
/// It is inadvisable to directly read from the underlying reader. |
Reading requires mutable access so this comment is possibly redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes reading doesn't require a mutable reference (e.g. &File
implements Read
), so I think the comment is worth having.
/// | ||
/// It is inadvisable to directly read from the underlying reader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// | |
/// It is inadvisable to directly read from the underlying reader. |
Which issue does this PR close?
Closes #4121.
Rationale for this change
What changes are included in this PR?
The
BufReader
andBufWriter
in Ruststd
have similar methods.Are there any user-facing changes?