4 ms·
There's a feature for that: you prefix the plumbing with `#`, and it runs in the doctest but doesn't render on the doc page. https://doc.rust-lang.org/rustdoc/d
by justinpombrio 5y ago
There's a feature for that: you prefix the plumbing with `#`, and it runs in the doctest but doesn't render on the doc page. https://doc.rust-lang.org/rustdoc/documentation-tests.html#hiding-portions-of-the-example https://doc.rust-lang.org/rustdoc/documentation-tests.html#h...
- Waterluvian 5y agoThat would help. I’ll have to experiment to better understand if it all works well enough. I’m thinking about Python unittest having setUp function for preparing every test without repeating myself. Maybe Rust has a similar way to define setup code for every test.