Skip to content

Commit

Permalink
Simplify bytes method
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Jul 29, 2024
1 parent d8cd8f6 commit 78869e6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 43 deletions.
80 changes: 40 additions & 40 deletions rust-runtime/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions rust-runtime/aws-smithy-types/src/byte_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,8 @@ impl ByteStream {

/// Returns a reference to the data if it is already available in memory
pub fn bytes(&self) -> Option<&[u8]> {
match &self.inner {
Inner { body } => body.bytes(),
}
let Inner { body } = &self.inner;
body.bytes()
}

/// Return the bounds on the remaining length of the `ByteStream`.
Expand Down

0 comments on commit 78869e6

Please sign in to comment.