We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d1d040 commit 04d0f78Copy full SHA for 04d0f78
src/main.rs
@@ -3,6 +3,7 @@ use crate::verify::verify;
3
use clap::{crate_version, App, Arg, SubCommand};
4
use notify::DebouncedEvent;
5
use notify::{RecommendedWatcher, RecursiveMode, Watcher};
6
+use std::ffi::OsStr;
7
use std::io::BufRead;
8
use std::sync::mpsc::channel;
9
use std::time::Duration;
@@ -85,8 +86,10 @@ fn watch() -> notify::Result<()> {
85
86
loop {
87
match rx.recv() {
88
Ok(event) => match event {
- DebouncedEvent::Chmod(_) | DebouncedEvent::Write(_) => {
89
- let _ignored = verify();
+ DebouncedEvent::Create(b) | DebouncedEvent::Chmod(b) | DebouncedEvent::Write(b) => {
90
+ if b.extension() == Some(OsStr::new("rs")) {
91
+ let _ignored = verify();
92
+ }
93
}
94
_ => {}
95
},
0 commit comments