• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

alloc_fill.rsH A D01-Jan-1970897 3325

alloc_try_with.rsH A D01-Jan-19702.4 KiB12091

alloc_with.rsH A D01-Jan-19701.4 KiB6952

allocator_api.rsH A D01-Jan-19703.2 KiB11793

quickchecks.rsH A D01-Jan-19706.9 KiB231203

readme_up_to_date.rsH A D01-Jan-1970647 2318

string.rsH A D01-Jan-1970438 2017

tests.rsH A D01-Jan-19705.1 KiB196151

try_alloc.rsH A D01-Jan-19709 KiB255197

try_alloc_try_with.rsH A D01-Jan-19702.6 KiB12091

try_alloc_with.rsH A D01-Jan-19701.5 KiB7154

vec.rsH A D01-Jan-19702.2 KiB8660

readme_up_to_date.rs

1 use std::fs;
2 use std::process::Command;
3 
4 #[test]
cargo_readme_up_to_date()5 fn 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