Make examples recognized by cargo #223
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#222 fixed the imports in the examples, however it didn't actually fix CI. The reason is that cargo doesn't recognize crate examples, only single files or a
main.rs
inside a single folder (not nested like in a crate). This PR fixes this by changing the file structure in such a way that cargo recognized them. Note that:cargo fmt
s the examples because now that cargo can see them it can also format them. This wasn't the case before.cargo check --examples
from CI because it is redundant:cargo test
already checks them, but both commands require the file structure to be correct.ConfigBuilder
in order to fix the warnings. This might need some feedback here since I'm not 100% this is right.main.rs
is not accurate anymore unfortunately.