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

Fix description of switch in tutorial #414

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

yerke
Copy link
Contributor

@yerke yerke commented Mar 2, 2025

I am reading the code correctly, switch will return false if an optional parameter is missing.

@pacak
Copy link
Owner

pacak commented Mar 2, 2025

You are absolutely correct, this is a derp on my side :)

doc2 is a crate that contains documentation and tutorials, but it's not published directly. Instead when you run its tests - it checks that all examples are correct, collects the expected output and generates files that are used for the documentation. In short - can you run cargo test -p docs2 - it should update documentation in bpaf crate itself and include this change to this MR?

@yerke yerke force-pushed the fix-description-of-switch-in-tutorial branch from 6ac18a0 to 54a7526 Compare March 5, 2025 03:42
@yerke
Copy link
Contributor Author

yerke commented Mar 5, 2025

@pacak Done. Thanks for the explanation. BTW, it seems that cargo test -p docs2 assumes that command line prompt is just % which is not always the case.

@pacak pacak merged commit 592b5e1 into pacak:master Mar 5, 2025
3 checks passed
@yerke yerke deleted the fix-description-of-switch-in-tutorial branch March 5, 2025 17:30
@pacak
Copy link
Owner

pacak commented Mar 5, 2025

BTW, it seems that cargo test -p docs2 assumes that command line prompt is just % which is not always the case.

Hmm? I had to use some prompt, originally I used % which is zsh - shell I'm using, then I switched to $ - bash is a more popular shell. I don't think it matters much as long as we are talking about just the documentation.

Anyway, I appreciate your fixes, will try to make a new release soon-ish.

@yerke
Copy link
Contributor Author

yerke commented Mar 5, 2025

@pacak No, what I meant is that I have a CLI prompt that includes my machine name and the name of the directory, so I was getting many irrelevant diffs when I ran cargo test -p docs2.
Thanks for putting all that effort into writing documentation and tutorials. They are very handy.

@pacak pacak mentioned this pull request Mar 6, 2025
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