use std::thread;
use std::time::{Duration, SystemTime};
+/// # Panics
+///
+/// Panics if the python commands could not be spawned
pub fn run(port: u16, lint: Option<&str>) -> ! {
let mut url = Some(match lint {
None => format!("http://localhost:{}", port),
loop {
if mtime("util/gh-pages/lints.json") < mtime("clippy_lints/src") {
- Command::new("python3")
- .arg("util/export.py")
+ Command::new("cargo")
+ .arg("collect-metadata")
.spawn()
.unwrap()
.wait()
// Give some time for python to start
thread::sleep(Duration::from_millis(500));
// Launch browser after first export.py has completed and http.server is up
- let _ = opener::open(url);
+ let _result = opener::open(url);
});
}
thread::sleep(Duration::from_millis(1000));