Skip to content

Commit

Permalink
Merge pull request #67 from Icelk/dependabot/cargo/notify-debouncer-f…
Browse files Browse the repository at this point in the history
…ull-0.4

build(deps): update notify-debouncer-full requirement from 0.3 to 0.4
  • Loading branch information
Icelk authored Oct 29, 2024
2 parents 77ed5c3 + f893b4b commit c3346d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion chute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ clap = { version = "4", optional = true, features = ["cargo"] }
clap_autocomplete = { version = ">= 0.4.1", optional = true }
env_logger = { version = "0.11", optional = true, default-features = false, features = ["auto-color", "humantime"] }
log = { version = "0.4.17", optional = true }
notify-debouncer-full = { version = "0.3", default-features = false }
notify-debouncer-full = { version = "0.4", default-features = false }
syntect = { version = "5.0.0", default-features = false, features = ["default-fancy"] }
lazy_static = "1.4.0"

Expand Down
11 changes: 2 additions & 9 deletions chute/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,7 @@ pub fn watch<P: AsRef<Path>>(
theme: &str,
syntax_highlighting: bool,
) {
use notify_debouncer_full::{
new_debouncer,
notify::{RecursiveMode, Watcher},
};
use notify_debouncer_full::{new_debouncer, notify::RecursiveMode};
use std::sync::mpsc::channel;

let path = path.as_ref();
Expand All @@ -554,11 +551,7 @@ pub fn watch<P: AsRef<Path>>(

// Add a path to be watched. All files and directories at that path and
// below will be monitored for changes.
if watcher
.watcher()
.watch(path, RecursiveMode::Recursive)
.is_err()
{
if watcher.watch(path, RecursiveMode::Recursive).is_err() {
error!("Failed to start watching {}.", path.display());
return;
}
Expand Down

0 comments on commit c3346d3

Please sign in to comment.