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

bootstrap repository setup #1

Merged
merged 10 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix lints
  • Loading branch information
aajtodd committed Jul 16, 2024
commit 6d87f22372199e392183d33d16d1ba1097bc2f73
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
RUST_BACKTRACE: 1
# Change to specific Rust release to pin
rust_stable: stable
rust_nightly: nightly-2024-05-05
rust_nightly: nightly-2024-07-07
rust_clippy: '1.77'
# When updating this, also update relevant docs
rust_min: '1.76'
Expand Down
2 changes: 1 addition & 1 deletion aws-s3-transfer-manager/src/download/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mod tests {
received.push(data);
}

let expected: Vec<String> = vec![0, 1, 2].iter().map(|i| format!("chunk {i}")).collect();
let expected: Vec<String> = [0, 1, 2].iter().map(|i| format!("chunk {i}")).collect();
assert_eq!(expected, received);
}

Expand Down
9 changes: 3 additions & 6 deletions aws-s3-transfer-manager/src/io/part_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl ReadPart for PartReader {

/// Data for a single part
pub(crate) struct PartData {
// 1-indexed
// 1-indexed
pub(crate) part_number: u64,
pub(crate) data: Bytes,
}
Expand Down Expand Up @@ -258,7 +258,7 @@ mod test {
use bytes::{Buf, Bytes};
use tempfile::NamedTempFile;

use crate::io::part_reader::{PartData, Builder, ReadPart};
use crate::io::part_reader::{Builder, PartData, ReadPart};
use crate::io::InputStream;

async fn collect_parts(reader: impl ReadPart) -> Vec<PartData> {
Expand Down Expand Up @@ -304,10 +304,7 @@ mod test {
let expected = data.chunks(part_size).collect::<Vec<_>>();

let stream = builder.build().unwrap();
let reader = Builder::new()
.part_size(part_size)
.stream(stream)
.build();
let reader = Builder::new().part_size(part_size).stream(stream).build();

let parts = collect_parts(reader).await;
let actual = parts.iter().map(|p| p.data.chunk()).collect::<Vec<_>>();
Expand Down
4 changes: 2 additions & 2 deletions aws-s3-transfer-manager/src/io/path_body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(super) struct PathBody {
pub(super) offset: u64,
}

/// Builder for creating [`InputStream`](InputStream) from a file/path.
/// Builder for creating [`InputStream`] from a file/path.
///
/// ```no_run
/// # {
Expand Down Expand Up @@ -145,7 +145,7 @@ mod test {

#[test]
fn test_explicit_content_length() {
let mut tmp = NamedTempFile::new().unwrap();
let tmp = NamedTempFile::new().unwrap();

let stream = PathBodyBuilder::new()
.path(tmp.path())
Expand Down
1 change: 1 addition & 0 deletions aws-s3-transfer-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub mod download;
pub mod error;

/// Types and helpers for I/O
#[allow(unused)] // FIXME(aws-sdk-rust#1159) - remove when consumed internally by other modules
pub mod io;

/// Abstractions for downloading objects from Amazon S3
Expand Down
1 change: 0 additions & 1 deletion aws-s3-transfer-manager/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
pub use crate::upload::request::UploadRequest;
pub use crate::upload::response::UploadResponse;


/// Request types for uploads to Amazon S3
pub mod request;

Expand Down
1 change: 1 addition & 0 deletions aws-s3-transfer-manager/src/upload/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ impl UploadRequest {
}

/// Split the body from the request by taking it and replacing it with the default.
#[allow(dead_code)] // FIXME(aws-sdk-rust#1159) - remove when consumed internally by other modules
pub(crate) fn take_body(&mut self) -> InputStream {
mem::take(&mut self.body)
}
Expand Down
Loading