Skip to content

Commit a7aa8bf

Browse files
committed
Watch tests/compile-test.rs in cargo dev serve
1 parent 5678531 commit a7aa8bf

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)