Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
alloc_fill.rs | H A D | 22-Nov-2019 | 815 | 32 | 24 | |
alloc_with.rs | H A D | 26-Mar-2019 | 1.3 KiB | 67 | 49 | |
quickchecks.rs | H A D | 22-Nov-2019 | 6.9 KiB | 231 | 203 | |
readme_up_to_date.rs | H A D | 20-Dec-2019 | 647 | 23 | 18 | |
string.rs | H A D | 07-Feb-2020 | 438 | 20 | 17 | |
tests.rs | H A D | 22-Nov-2019 | 5.1 KiB | 196 | 151 | |
vec.rs | H A D | 07-Feb-2020 | 1.4 KiB | 60 | 46 |
readme_up_to_date.rs
1 use std::fs; 2 use std::process::Command; 3 4 #[test] cargo_readme_up_to_date()5fn cargo_readme_up_to_date() { 6 println!("Checking that `cargo readme > README.md` is up to date..."); 7 8 let expected = Command::new("cargo") 9 .arg("readme") 10 .current_dir(env!("CARGO_MANIFEST_DIR")) 11 .output() 12 .expect("should run `cargo readme` OK") 13 .stdout; 14 let expected = String::from_utf8_lossy(&expected); 15 16 let actual = fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md")) 17 .expect("should read README.md OK"); 18 19 if actual != expected { 20 panic!("Run `cargo readme > README.md` to update README.md"); 21 } 22 } 23