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

Provide SigningService creation via owned String (#1114) #1120

Merged
merged 5 commits into from
Jan 25, 2022

Conversation

mchoicpe-amazon
Copy link
Contributor

@mchoicpe-amazon mchoicpe-amazon commented Jan 25, 2022

Motivation and Context

SigningService has inner type Cow<'static, str> but does not allow creation with owned String. This causes limitations in its functionality to users.
#1114

Description

Implement From trait for SigningService.

Testing

Code change is minimal. Testing not added, changes checked for compilation and functionally through playground as well as cargo test.

Checklist

[x] I have updated CHANGELOG.next.toml if I made changes to the smithy-rs codegen or runtime crates

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

@mchoicpe-amazon mchoicpe-amazon requested a review from a team as a code owner January 25, 2022 22:22
CHANGELOG.next.toml Show resolved Hide resolved
@@ -42,3 +42,9 @@ impl SigningService {
SigningService(Cow::Borrowed(service))
}
}

impl From<String> for SigningService {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks great! Thanks!

Copy link
Collaborator

@jdisanti jdisanti left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! ❤️

@jdisanti
Copy link
Collaborator

Don't worry about the PR Bot failures. If everything else passes, I'll get this merged and into the next release.

@jdisanti jdisanti merged commit e0f0193 into smithy-lang:main Jan 25, 2022
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.

3 participants