Rename reconfig to reconfigure
This commit is contained in:
parent
3066ee5913
commit
18d2487ec3
|
@ -10,7 +10,7 @@ use crate::{action::Action, command::Shell, error::RuntimeError, fs::Watcher, ha
|
|||
/// Runtime configuration for [`Watchexec`][crate::Watchexec].
|
||||
///
|
||||
/// This is used both when constructing the instance (as initial configuration) and to reconfigure
|
||||
/// it at runtime via [`Watchexec::reconfig()`][crate::Watchexec::reconfig()].
|
||||
/// it at runtime via [`Watchexec::reconfigure()`][crate::Watchexec::reconfigure()].
|
||||
///
|
||||
/// Use [`RuntimeConfig::default()`] to build a new one, or modify an existing one. This struct is
|
||||
/// marked non-exhaustive such that new options may be added without breaking change. You can make
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
//! The main way to use this crate involves constructing a [`Watchexec`] around an
|
||||
//! [`InitConfig`][config::InitConfig] and a [`RuntimeConfig`][config::RuntimeConfig], then running
|
||||
//! it. [`Handler`][handler::Handler]s are used to hook into watchexec at various points. The
|
||||
//! runtime config can be changed at any time with the [`reconfig()`][Watchexec::reconfig()] method.
|
||||
//! runtime config can be changed at any time with the [`Watchexec::reconfigure()`] method.
|
||||
//!
|
||||
//! ```no_run
|
||||
//! # use color_eyre::eyre::Report;
|
||||
|
@ -45,7 +45,7 @@
|
|||
//! let conf = YourConfigFormat::load_from_file("watchexec.conf").await?;
|
||||
//!
|
||||
//! conf.apply(&mut c);
|
||||
//! w.reconfig(c.clone());
|
||||
//! w.reconfigure(c.clone());
|
||||
//! // tada! self-reconfiguring watchexec on config file change!
|
||||
//!
|
||||
//! break;
|
||||
|
|
|
@ -90,7 +90,7 @@ impl Watchexec {
|
|||
}))
|
||||
}
|
||||
|
||||
pub fn reconfig(&self, config: RuntimeConfig) -> Result<(), ReconfigError> {
|
||||
pub fn reconfigure(&self, config: RuntimeConfig) -> Result<(), ReconfigError> {
|
||||
debug!(?config, "reconfiguring");
|
||||
self.action_watch.send(config.action)?;
|
||||
self.fs_watch.send(config.fs)?;
|
||||
|
|
Loading…
Reference in New Issue