diff --git a/core/coms/service/src/mng.rs b/core/coms/service/src/mng.rs index 47c2cf00b0c12ada036b06f732c12dcb22c6854f..cf545f4b61851b4b65c7779870d39411208900d0 100644 --- a/core/coms/service/src/mng.rs +++ b/core/coms/service/src/mng.rs @@ -1115,7 +1115,7 @@ impl ServiceMng { } fn demand_pid_file(&self) -> Result<()> { - let pid_file_inotify = PathIntofy::new(self.config.pid_file().unwrap()); + let pid_file_inotify = PathInotify::new(self.config.pid_file().unwrap()); self.rd.attach_inotify(Rc::new(pid_file_inotify)); @@ -1913,12 +1913,12 @@ impl RunningData { *self.mng.borrow_mut() = Rc::downgrade(&mng); } - pub(self) fn attach_inotify(&self, path_inotify: Rc) { + pub(self) fn attach_inotify(&self, path_inotify: Rc) { path_inotify.attach(self.mng.borrow_mut().clone()); self.data.borrow_mut().attach_inotify(path_inotify); } - pub(self) fn path_inotify(&self) -> Rc { + pub(self) fn path_inotify(&self) -> Rc { self.data.borrow().path_inotify() } @@ -2071,7 +2071,7 @@ impl RunningData { struct Rtdata { errno: i32, notify_state: NotifyState, - path_inotify: Option>, + path_inotify: Option>, forbid_restart: bool, reset_restarts: bool, @@ -2118,11 +2118,11 @@ impl Rtdata { self.errno } - pub(self) fn attach_inotify(&mut self, path_inotify: Rc) { + pub(self) fn attach_inotify(&mut self, path_inotify: Rc) { self.path_inotify = Some(path_inotify) } - pub(self) fn path_inotify(&self) -> Rc { + pub(self) fn path_inotify(&self) -> Rc { self.path_inotify.as_ref().unwrap().clone() } @@ -2205,7 +2205,7 @@ enum PathType { Modified, } -struct PathIntofy { +struct PathInotify { path: PathBuf, p_type: PathType, inotify: RefCell, @@ -2213,7 +2213,7 @@ struct PathIntofy { mng: RefCell>, } -impl fmt::Display for PathIntofy { +impl fmt::Display for PathInotify { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, @@ -2225,9 +2225,9 @@ impl fmt::Display for PathIntofy { } } -impl PathIntofy { +impl PathInotify { fn new(path: PathBuf) -> Self { - PathIntofy { + PathInotify { path, p_type: PathType::Modified, inotify: RefCell::new(-1), @@ -2368,7 +2368,7 @@ impl PathIntofy { } } -impl Source for PathIntofy { +impl Source for PathInotify { fn fd(&self) -> RawFd { *self.inotify.borrow() }