mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-11-08 09:09:17 +01:00
Check if changed exercise file exists before calling verify.
This commit is contained in:
parent
70946b85e5
commit
ba85ca32c4
@ -101,7 +101,7 @@ fn watch(exercises: &[Exercise]) -> notify::Result<()> {
|
||||
match rx.recv() {
|
||||
Ok(event) => match event {
|
||||
DebouncedEvent::Create(b) | DebouncedEvent::Chmod(b) | DebouncedEvent::Write(b) => {
|
||||
if b.extension() == Some(OsStr::new("rs")) {
|
||||
if b.extension() == Some(OsStr::new("rs")) && b.exists() {
|
||||
println!("----------**********----------\n");
|
||||
let filepath = b.as_path().canonicalize().unwrap();
|
||||
let exercise = exercises
|
||||
|
Loading…
Reference in New Issue
Block a user