home ~ projects ~ socials

Skip Doctests When Running cargo test

I don't use doctests when I'm working on small, one-off Rust apps. The default functionality of cargo test it so run them. The result is an empty report that shows up last. It's no big deal but it throws me off seeing 0 passed in the report.

I use this in my cargo.toml file to turn off the tests and the subsequent report:

[lib]
doctest = false

It's a nice little quality of live improvement.

-- end of line --