mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
Cease with the 2015-style #[macro_use]s
This commit is contained in:
parent
66caedf978
commit
d8fb70c454
@ -13,6 +13,7 @@
|
|||||||
//! .expect("mission failed");
|
//! .expect("mission failed");
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
|
use derive_builder::Builder;
|
||||||
use std::{path::PathBuf, time::Duration};
|
use std::{path::PathBuf, time::Duration};
|
||||||
|
|
||||||
use crate::run::OnBusyUpdate;
|
use crate::run::OnBusyUpdate;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
|
use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
|
||||||
|
use log::debug;
|
||||||
|
|
||||||
use std::borrow::ToOwned;
|
use std::borrow::ToOwned;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
|
use globset::{GlobBuilder, GlobSet, GlobSetBuilder};
|
||||||
|
use log::debug;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
@ -8,13 +8,6 @@
|
|||||||
#![doc(html_logo_url = "https://watchexec.github.io/logo:watchexec.svg")]
|
#![doc(html_logo_url = "https://watchexec.github.io/logo:watchexec.svg")]
|
||||||
#![warn(clippy::unwrap_used)]
|
#![warn(clippy::unwrap_used)]
|
||||||
|
|
||||||
#[macro_use]
|
|
||||||
extern crate derive_builder;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate log;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate lazy_static;
|
|
||||||
|
|
||||||
pub mod config;
|
pub mod config;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
mod gitignore;
|
mod gitignore;
|
||||||
|
@ -2,6 +2,7 @@ use crate::error;
|
|||||||
use crate::gitignore::Gitignore;
|
use crate::gitignore::Gitignore;
|
||||||
use crate::ignore::Ignore;
|
use crate::ignore::Ignore;
|
||||||
use globset::{Glob, GlobSet, GlobSetBuilder};
|
use globset::{Glob, GlobSet, GlobSetBuilder};
|
||||||
|
use log::debug;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
pub struct NotificationFilter {
|
pub struct NotificationFilter {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use command_group::UnixChildExt;
|
use command_group::UnixChildExt;
|
||||||
use command_group::{CommandGroup, GroupChild};
|
use command_group::{CommandGroup, GroupChild};
|
||||||
|
use log::{debug, info, warn};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
|
|
||||||
type CleanupFn = Box<dyn Fn(self::Signal) + Send>;
|
type CleanupFn = Box<dyn Fn(self::Signal) + Send>;
|
||||||
lazy_static! {
|
lazy_static::lazy_static! {
|
||||||
static ref CLEANUP: Mutex<Option<CleanupFn>> = Mutex::new(None);
|
static ref CLEANUP: Mutex<Option<CleanupFn>> = Mutex::new(None);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,6 +106,7 @@ pub fn install_handler<F>(handler: F)
|
|||||||
where
|
where
|
||||||
F: Fn(self::Signal) + 'static + Send + Sync,
|
F: Fn(self::Signal) + 'static + Send + Sync,
|
||||||
{
|
{
|
||||||
|
use log::debug;
|
||||||
use nix::sys::signal::*;
|
use nix::sys::signal::*;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use log::debug;
|
||||||
use notify::{raw_watcher, PollWatcher, RecommendedWatcher, RecursiveMode};
|
use notify::{raw_watcher, PollWatcher, RecommendedWatcher, RecursiveMode};
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
Loading…
Reference in New Issue
Block a user