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

Make return types consistent: use Option<&str> instead of &Option<String> #68

Open
ysaito1001 opened this issue Oct 30, 2024 · 0 comments

Comments

@ysaito1001
Copy link

For struct getters that return &Option<String> throughout the codebase, replace them with Option<&str>.

There are structs in the AWS SDK crates that return &Option<string> but this is due to the smithy-rs code generator mechanically determining the return type as &Option<T> given a struct field of type T. If we can afford to handwrite the Rust code, we should prefer more idiomatic Option<&str>.

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

No branches or pull requests

1 participant