mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-24 20:43:07 +00:00
254ee9bf43
Hidden ./src/web/clients/requests/header.md and ./src/web/clients/api/rate-limited.md as the custom header story is being reworked in https://github.com/hyperium/headers
21 lines
575 B
Rust
21 lines
575 B
Rust
extern crate skeptic;
|
|
extern crate walkdir;
|
|
|
|
use walkdir::WalkDir;
|
|
|
|
const REMOVED_TESTS: &[&str] = &[
|
|
"./src/web/clients/requests/header.md",
|
|
"./src/web/clients/api/rate-limited.md",
|
|
];
|
|
|
|
fn main() {
|
|
let paths = WalkDir::new("./src/").into_iter()
|
|
// convert paths to Strings
|
|
.map(|p| p.unwrap().path().to_str().unwrap().to_string())
|
|
// only compile markdown files
|
|
.filter(|p| p.ends_with(".md"))
|
|
.filter(|p| !REMOVED_TESTS.contains(&p.as_ref()))
|
|
.collect::<Vec<_>>();
|
|
|
|
skeptic::generate_doc_tests(&paths[..]);
|
|
}
|