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

Improve documentation of derive macros #429

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

turion
Copy link
Contributor

@turion turion commented Feb 10, 2022

This clarifies the usage of the Nif* derive macros a bit, and removes a few small errors.

@evnu evnu requested a review from a team February 11, 2022 12:08
Copy link
Member

@hansihe hansihe left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

Generally like the changes and think they make for a much easier to understand documentation, I just have some small nits :)

/// Implementation of the `NifStruct` macro that lets the user annotate a struct that will
/// be translated directly from an Elixir struct to a Rust struct. For example, the following
/// struct, annotated as such:
/// Create a correspondence between an Elixir struct and a Rust struct.
Copy link
Member

Choose a reason for hiding this comment

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

Macro for automatically deriving Encoder and Decoder implementations which convert between a Rust struct and an Elixir struct.

How about something like this? In my mind the word correspondence might not be the most descriptive in this case.

Copy link
Member

Choose a reason for hiding this comment

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

The same also applies in the other cases this wording is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's definitely an improvement! I changed the wording further, hopefully keeping your spirit.

@turion
Copy link
Contributor Author

turion commented Mar 17, 2022

@hansihe What do you think about this version?

@evnu evnu merged commit 3b053a1 into rusterlium:master Apr 12, 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.

4 participants