Skip to content

Rename to_str() -> as_str() to match stdlib naming convention #134

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
Jun 8, 2019
Merged

Rename to_str() -> as_str() to match stdlib naming convention #134

merged 1 commit into from
Jun 8, 2019

Conversation

flub
Copy link
Contributor

@flub flub commented Jun 7, 2019

The function does a cast and does not create a new objects. The
stdlib convention is to use to_() for functions which return new
objects and as_
() for functions which keep referring to the same data
but using a different type. Follow that convention.

The function does a cast and does not create a new objects.  The
stdlib convention is to use to_*() for functions which return new
objects and as_*() for functions which keep referring to the same data
but using a different type.  Follow that convention.
@dignifiedquire
Copy link
Collaborator

you are entirely right, thank you

@ralphtheninja
Copy link
Collaborator

What's that upload_docs_wheels error?

@flub
Copy link
Contributor Author

flub commented Jun 8, 2019

Oh, that's because this PR is from a fork rather than a branch on the main repo and PRs from forks don't get the secret injected via an env var so fail. I fixed that in #136 but forgot that would affect this too. But now #136 is merged that shouldn't happen anymore.

@flub flub merged commit 0bce754 into chatmail:master Jun 8, 2019
@flub flub deleted the as_str branch June 8, 2019 09:15
jptyrkko pushed a commit to open-xchange/deltachat-core-rust that referenced this pull request Aug 19, 2019
This update addresses the tickets chatmail#133 and chatmail#134.

The mode of the program is now controlled by a new configuration parameter ChatMode, whose value "off" forces the program to use the "Gr." legacy prefix, and "on", which outputs the "chat$group." prefix. For reading the header both prefixes are recognized and accepted.

Function dc_create_outgoing_rfc724_mid has now a new parameter "context" to allow reading the configuration within the function.

The new convention has been reflected on the tests at the end of dc_tools.rs.

In the source the modified code sections are marked by the date and the committer name "Juha-Petri Tyrkkö".
phranck pushed a commit to open-xchange/deltachat-core-rust that referenced this pull request Sep 16, 2019
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