simplified match
This commit is contained in:
@@ -5,7 +5,7 @@ use notify::{
|
|||||||
event::ModifyKind,
|
event::ModifyKind,
|
||||||
Event, EventKind, RecursiveMode, Watcher,
|
Event, EventKind, RecursiveMode, Watcher,
|
||||||
};
|
};
|
||||||
use std::{env, path::Path, process::Output};
|
use std::{env, path::Path};
|
||||||
|
|
||||||
use crate::app::{ watcher::watcher, build::{docki_build, DockiBuildResult}, commands::build::build, log::display_status};
|
use crate::app::{ watcher::watcher, build::{docki_build, DockiBuildResult}, commands::build::build, log::display_status};
|
||||||
|
|
||||||
@@ -44,9 +44,7 @@ async fn watch(path: &Path) -> notify::Result<()> {
|
|||||||
|
|
||||||
fn file_change(event: Event) {
|
fn file_change(event: Event) {
|
||||||
match event.kind {
|
match event.kind {
|
||||||
EventKind::Modify(ModifyKind::Data(_)) => {
|
EventKind::Modify(ModifyKind::Data(_)) => build_file(event.paths),
|
||||||
build_file(event.paths)
|
|
||||||
}
|
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user