You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "LDeakin (via GitHub)" <gi...@apache.org> on 2024/07/06 01:29:03 UTC
[PR] feat(core): Add `Buffer::into_bytes()` [opendal]
LDeakin opened a new pull request, #4858:
URL: https://github.com/apache/opendal/pull/4858
`Buffer::into_bytes` is zero copy if the underlying bytes are contiguous. Also implements `From<Buffer>` for `Bytes`.
Fixes #4857.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(core/types): avoid a copy in `Buffer::to_bytes()` by cloning contiguous bytes [opendal]
Posted by "LDeakin (via GitHub)" <gi...@apache.org>.
LDeakin commented on PR #4858:
URL: https://github.com/apache/opendal/pull/4858#issuecomment-2211594369
Great! That is much cleaner.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(core/types): Add `Buffer::into_bytes()` [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on PR #4858:
URL: https://github.com/apache/opendal/pull/4858#issuecomment-2211591393
Hi, it's by design that we didn't implement `into_bytes` and `From<Bytes>` for `Buffer`. I believe we can use `Bytes::clone` in `to_bytes` to save the cost instead of adding `into_bytes`.
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(core/types): avoid a copy in `Buffer::to_bytes()` by cloning contiguous bytes [opendal]
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #4858:
URL: https://github.com/apache/opendal/pull/4858
--
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: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org