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

Prepare for the release #90

Merged
merged 2 commits into from
Aug 4, 2021
Merged

Conversation

hug-dev
Copy link
Member

@hug-dev hug-dev commented Aug 3, 2021

Also updates the code documention to be up to date.

Signed-off-by: Hugues de Valon <[email protected]>
Comment on lines 216 to 220
/// ```no_run
///use parsec_client::BasicClient;
///let mut client = BasicClient::new_naked();
///client.set_default_provider().unwrap();
/// ```
Copy link
Member

Choose a reason for hiding this comment

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

Are these examples actually useful? I mean, you're literally just calling one method without any arguments on a newly created object, I don't think it actually adds anything to the documentation. The ones where the arguments are actually somewhat complex, or that need some setup are probably worth it

Copy link
Member Author

Choose a reason for hiding this comment

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

I think so, it allows users to use the function in their code by just copying and pasting and they are sure it will compile. I also tend to think that even useless documentation/comment is better than nothing.

Copy link
Member

@ionut-arm ionut-arm left a comment

Choose a reason for hiding this comment

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

https://rust-lang.github.io/api-guidelines/documentation.html#all-items-have-a-rustdoc-example-c-example
¯\_(ツ)_/¯

We've definitely not followed that guideline in many places - especially the TSS crate is littered with "how not why" examples. ☹️ Though at the same time the standard library documentation is full of examples which are both useless for copying and as a "why", so.... guess it's fine either way.

@hug-dev
Copy link
Member Author

hug-dev commented Aug 4, 2021

Agree that some of the examples here are poor. I tried to make some of them better with more context and added links where they are the same.

edit: will open an issue to finish this work and the methods I did not touch.

@hug-dev hug-dev merged commit b25bf19 into parallaxsecond:main Aug 4, 2021
@hug-dev hug-dev deleted the prepare-release branch August 4, 2021 08:59
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.

2 participants