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

fix(aw-client-rust): make create_bucket_simple useful #331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hapm
Copy link

@hapm hapm commented Dec 16, 2022

create_bucket_simple should expose the created bucket for later use. This would allow to expose the id, which can be generated based on the bucket name given and the hostname, what in turn leads to simpler creation of a new Bucket, as intended by the function.

let bucket = Bucket {
bid: None,
id: bucketname.to_string(),
id: format!("{}_{}", bucketname, self.hostname),
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change. I suggest to keep the original behavior to avoid mishaps.

Suggested change
id: format!("{}_{}", bucketname, self.hostname),
id: bucketname.to_string(),

If you want your ID with a hostname suffix, better pass a different bucketname instead of adding this assumption to the create_bucket_simple method.

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.

None yet

2 participants