Skip to content
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

Relaxing type bounds on coalesce_ranges and collect_bytes #4787

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

sumerman
Copy link
Contributor

@sumerman sumerman commented Sep 7, 2023

Which issue does this PR close?

A followup to #4784

Rationale for this change

Now that coalesce_ranges and collect_bytes were made public the next logical step is to relax their type bounds. Thus allowing to use them with a wider range of Error types.

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the object-store Object Store Interface label Sep 7, 2023
@sumerman sumerman force-pushed the std-err-in-pub-util-pr branch 2 times, most recently from 60b9e85 to 64e0219 Compare September 7, 2023 12:55
pub async fn collect_bytes<S, E>(
mut stream: S,
size_hint: Option<usize>,
) -> StdResult<Bytes, E>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
) -> StdResult<Bytes, E>
) -> Result<Bytes, E>

The type def just defaults to object_store::Error

to allow using them with a wider range of Error types.
@sumerman sumerman force-pushed the std-err-in-pub-util-pr branch from 64e0219 to 87d87e5 Compare September 7, 2023 13:51
@tustvold tustvold merged commit dd0c4ab into apache:master Sep 7, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
object-store Object Store Interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants