Skip to content

Add example to the README.md file#270

Merged
KodrAus merged 1 commit into
bitflags:mainfrom
tiaanl:add-readme-example
Apr 20, 2022
Merged

Add example to the README.md file#270
KodrAus merged 1 commit into
bitflags:mainfrom
tiaanl:add-readme-example

Conversation

@tiaanl

@tiaanl tiaanl commented Jan 23, 2022

Copy link
Copy Markdown
Contributor

Add a simple example to the README.md file to show the capabilities of the crate. The README is displayed in many places where developers are evaluating its use and having an example is always useful.

@KodrAus

KodrAus commented Feb 27, 2022

Copy link
Copy Markdown
Member

Thanks @tiaanl! This looks good to me, but for the README it might be good to put some comments inline with the bitflags! invocation and its use to suggest the macro is how you define a flags type, which then generates a bunch of set-like methods for you. What do you think?

@tiaanl tiaanl force-pushed the add-readme-example branch from 6df2ce2 to decb0f6 Compare April 8, 2022 07:46
@tiaanl

tiaanl commented Apr 8, 2022

Copy link
Copy Markdown
Contributor Author

@KodrAus I copied a small comment from the lib.rs docs and also grabbed the example code from there to add more use cases.

@KodrAus KodrAus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @tiaanl! Sorry for the radio silence on this one. This looks good to me.

@tiaanl

tiaanl commented Apr 15, 2022

Copy link
Copy Markdown
Contributor Author

@KodrAus Thanks for the approval. I'm not sure why all the checks are failing. I only changed the README 😕 Any suggestions?

@KodrAus

KodrAus commented Apr 20, 2022

Copy link
Copy Markdown
Member

That's just changes to Rust's compiler messages so nothing to worry about here. I've fixed those up so will merge this one in. Thanks again!

@KodrAus KodrAus merged commit 186a7bb into bitflags:main Apr 20, 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.

2 participants