You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "huonw (via GitHub)" <gi...@apache.org> on 2023/09/10 04:07:59 UTC
[GitHub] [incubator-opendal] huonw opened a new pull request, #3027: refactor: Relax bounds on Writer::{sink, copy}
huonw opened a new pull request, #3027:
URL: https://github.com/apache/incubator-opendal/pull/3027
This adjusts the trait bounds on the input stream (for `sink`) or reader (for `copy`) for the `opendal::Writer` type to be less strict, and thus allow more types to be passed in.
In particular, the current implementations of these functions do not use any of the additional "information"/requirements that `Send + Sync + Unpin + 'static` imply. The `'static` bound is particularly restrictive, as it stops one being able to pass in any borrowed data, such as a `&mut dyn AsyncRead` object or similar. Without these bounds, one can pass in more readers or more streams, more simply.
There is a downside to this change: if these _implementations_ wanted to change in future to use any of these (e.g. a threaded implementation of `copy` or something), that becomes a breaking change. I would suggest that's okay: any fancy implementation like that would be best offered in _addition_ to these simple ones, exactly because they'll need to impose additional restrictions on their input types.
(Thank you for OpenDAL!)
--
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
[GitHub] [incubator-opendal] Xuanwo merged pull request #3027: refactor: Relax bounds on Writer::{sink, copy}
Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo merged PR #3027:
URL: https://github.com/apache/incubator-opendal/pull/3027
--
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