Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Nov 11, 2024
1 parent 49a681a commit b3bf149
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aws-s3-transfer-manager/src/operation/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ fn handle_discovery_chunk(
.map(|aggregated| ChunkResponse {
seq,
data: aggregated,
metadata: metadata.expect("metadata is available"),
metadata: metadata.expect("chunk metadata is available"),
})
.map_err(error::discovery_failed);

Expand Down
5 changes: 2 additions & 3 deletions aws-s3-transfer-manager/src/operation/download/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ use crate::error::ErrorKind;

use super::chunk_meta::ChunkMetadata;

#[derive(Debug, Clone)]

/// Non-contiguous Binary Data Storage
///
/// When data is read from the network, it is read in a sequence of chunks that are not in
/// contiguous memory. [`AggregatedBytes`](crate::byte_stream::AggregatedBytes) provides a view of
/// this data via [`impl Buf`](bytes::Buf) or it can be copied into contiguous storage with
/// [`.into_bytes()`](crate::byte_stream::AggregatedBytes::into_bytes).
#[derive(Debug, Clone)]
pub struct AggregatedBytes(SegmentedBuf<Bytes>);

impl AggregatedBytes {
Expand Down Expand Up @@ -56,7 +55,7 @@ impl AggregatedBytes {
while let Some(buf) = value.next().await {
match buf {
Ok(buf) => output.push(buf),
Err(err) => return Err(crate::error::from_kind(ErrorKind::IOError)(err)),
Err(err) => return Err(crate::error::from_kind(ErrorKind::ChunkFailed)(err)),
};
}
Ok(AggregatedBytes(output))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ impl From<HeadObjectOutput> for ObjectMetadata {
extended_request_id: value.extended_request_id().map(|s| s.to_string()),
request_charged: value.request_charged,
delete_marker: value.delete_marker,
// accept_ranges: value.accept_ranges,
expiration: value.expiration,
restore: value.restore,
last_modified: value.last_modified,
Expand Down

0 comments on commit b3bf149

Please sign in to comment.