Skip to content

Rename get_str() → get_string() to match returned type #189

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

Merged
merged 1 commit into from
Mar 28, 2021

Conversation

alerque
Copy link
Contributor

@alerque alerque commented Mar 28, 2021

Closes #140.

I couldn't find any good reason to make this return &str instead, the handling everywhere else is as String so just renaming the function to match what it already does seemed most logical thing to do.

This will be a breaking change to the API, but the fix will be easy. All instances of Config.get_str() need to be changed to Config.get_string(). The returned value being handled in people's code is already String.

@matthiasbeyer
Copy link
Member

Nice, thanks!

I'd take this patch as is, but please remove the CHANGELOG entry from the commit. I will take care of writing the changelog myself right before the release - that's just the way I prefer to do it.
Otherwise, this looks fine! 🎉

Copy link
Member

@matthiasbeyer matthiasbeyer left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@matthiasbeyer matthiasbeyer merged commit e8dccf2 into rust-cli:master Mar 28, 2021
@alerque alerque deleted the func-rename branch March 28, 2021 19:56
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.

Function misnamed, should corrrelate to type
2 participants