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

Moved S3 code examples into s3 directory; added some S3 code examples #490

Merged
merged 5 commits into from
Jun 15, 2021

Conversation

Doug-AWS
Copy link
Contributor

Issue #, if available:
Moved S3 .RS files into s3/src/bin; added a couple more code examples.

Description of changes:
Part of the resolution of issue #400.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Some(objects) => {
// vector of Object items
println!("Objects:");
for (_, x) in objects.iter().enumerate() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm a little confused here, why get an index with .enumerate() but then just ignore it?

What about something like:

println!("Objects:");
for object in resp.contents.unwrap_or_default() {
   println!(" {}", object.key.expect("objects have keys"));
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rookie mistake. Fixed.

@rcoh rcoh enabled auto-merge (squash) June 15, 2021 20:17
@rcoh rcoh merged commit c15b65e into main Jun 15, 2021
@rcoh rcoh deleted the doug-refactor-s3-examples branch June 15, 2021 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants