Skip to content

Commit 9d03956

Browse files
committed
Auto merge of #13635 - Alexendoo:cargo-dev-serve-watch-test, r=blyxyas
Watch `tests/compile-test.rs` in `cargo dev serve` Changes to `compile-test.rs` will also need a rerun of `collect-metadata` changelog: none
2 parents e4dc892 + a7aa8bf commit 9d03956

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

clippy_dev/src/serve.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,14 @@ pub fn run(port: u16, lint: Option<String>) -> ! {
2020

2121
loop {
2222
let index_time = mtime("util/gh-pages/index.html");
23+
let times = [
24+
"clippy_lints/src",
25+
"util/gh-pages/index_template.html",
26+
"tests/compile-test.rs",
27+
]
28+
.map(mtime);
2329

24-
if index_time < mtime("clippy_lints/src") || index_time < mtime("util/gh-pages/index_template.html") {
30+
if times.iter().any(|&time| index_time < time) {
2531
Command::new(env::var("CARGO").unwrap_or("cargo".into()))
2632
.arg("collect-metadata")
2733
.spawn()

0 commit comments

Comments
 (0)