mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-14 00:01:12 +01:00
Remove borrowing that was introduced in previous release
This commit is contained in:
parent
05c0d4aaea
commit
e33fd8f5b5
2 changed files with 7 additions and 7 deletions
|
@ -3,5 +3,5 @@ extern crate watchexec;
|
|||
use watchexec::{cli, error, run};
|
||||
|
||||
fn main() -> error::Result<()> {
|
||||
run(&cli::get_args()?)
|
||||
run(cli::get_args()?)
|
||||
}
|
||||
|
|
12
src/run.rs
12
src/run.rs
|
@ -145,14 +145,14 @@ where
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub struct ExecHandler<'a> {
|
||||
args: &'a Args,
|
||||
pub struct ExecHandler {
|
||||
args: Args,
|
||||
signal: Option<Signal>,
|
||||
child_process: Arc<RwLock<Option<Process>>>,
|
||||
}
|
||||
|
||||
impl<'a> ExecHandler<'a> {
|
||||
pub fn new(args: &'a Args) -> Result<Self> {
|
||||
impl ExecHandler {
|
||||
pub fn new(args: Args) -> Result<Self> {
|
||||
let child_process: Arc<RwLock<Option<Process>>> = Arc::new(RwLock::new(None));
|
||||
let weak_child = Arc::downgrade(&child_process);
|
||||
|
||||
|
@ -191,7 +191,7 @@ impl<'a> ExecHandler<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> Handler for ExecHandler<'a> {
|
||||
impl Handler for ExecHandler {
|
||||
fn args(&self) -> Args {
|
||||
self.args.clone()
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ impl<'a> Handler for ExecHandler<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn run(args: &Args) -> Result<()> {
|
||||
pub fn run(args: Args) -> Result<()> {
|
||||
watch(&ExecHandler::new(args)?)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue