-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return impl AsyncBufRead from into_async_read (#3164)
## Motivation and Context The tokio `StreamReader` implements `AsyncBufRead`, but we're returning `AsyncRead` currently. If a user needs an `AsyncBufRead`, then they've to wrap the returned value in tokio `BufReader` for no reason. Since `ByteStream` doesn't implement `Stream` anymore, one has to either wrap the returned value unnecessarily or write a wrapper similar to this function. See #2983 (comment). ## Description Simply changed the return type to say `impl AsyncBufRead`. Since `AsyncBufRead` is a super-set of `AsyncRead`, this is not a breaking change. ## Testing The code example tests it. ## Checklist - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._ --------- Co-authored-by: Russell Cohen <[email protected]>
- Loading branch information
1 parent
9a82b44
commit 7f8fef2
Showing
3 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters