Test your Readme with Cargo - Rust Pro Tips

Опубликовано: 18 Ноябрь 2024
на канале: GeekLaunch
190
9

Insert the README into a crate’s documentation by putting #![doc = include_str!("../README.md")] in lib.rs. This can help avoid duplicating information between the README and the documentation, and will also test README examples as doctests.

Docs: https://doc.rust-lang.org/rustdoc/wri...

http://geeklaunch.io/
Follow GeekLaunch on Twitter:   / geek_launch  

Not a geek? Start today!