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 doc tests #169

Closed
greyblake opened this issue Aug 23, 2024 · 1 comment · Fixed by #171
Closed

Fix doc tests #169

greyblake opened this issue Aug 23, 2024 · 1 comment · Fixed by #171
Labels

Comments

@greyblake
Copy link
Owner

Steps to reproduce

With Rust 1.80.1

  • cd /nutype (the dir with nutype crate)
  • cargo test
  • See number of failing test, e.g.
---- nutype/src/lib.rs - (line 123) stdout ----
error: To validate string types with regex, the feature `regex` of the crate `nutype` must be enabled.
       IMPORTANT: Make sure that your crate EXPLICITLY depends on `regex` and `lazy_static` crates.
       And... don't forget to take care of yourself and your beloved ones. That is even more important.
 --> nutype/src/lib.rs:129:19
  |
9 | #[nutype(validate(regex = "^[0-9]{3}-[0-9]{3}$"))]
  |                   ^^^^^

To do

  • Found out when the regression was introduced
  • Fix
  • Setup CI to catch this in the future
  • Update Justfile to run doc tests in nutype crate
@greyblake
Copy link
Owner Author

greyblake commented Aug 25, 2024

Commit that introduced the the problem: 367f638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant