Merge pull request #66 from PR0M3TH3AN/codex/fix-rustfmt-formatting-issues

Format watcher module
This commit is contained in:
thePR0M3TH3AN
2025-05-22 17:50:36 -04:00
committed by GitHub

View File

@@ -520,15 +520,16 @@ impl FileWatcher {
let _ = h.join(); let _ = h.join();
} }
*self *self.state.lock().map_err(|_| anyhow::anyhow!("state"))? = WatcherState::Stopped;
.state
.lock()
.map_err(|_| anyhow::anyhow!("state"))? = WatcherState::Stopped;
Ok(()) Ok(())
} }
pub fn status(&self) -> Result<WatcherStatus> { pub fn status(&self) -> Result<WatcherStatus> {
let st = self.state.lock().map_err(|_| anyhow::anyhow!("state"))?.clone(); let st = self
.state
.lock()
.map_err(|_| anyhow::anyhow!("state"))?
.clone();
Ok(WatcherStatus { Ok(WatcherStatus {
state: st, state: st,
events_processed: self.events_processed.load(Ordering::SeqCst), events_processed: self.events_processed.load(Ordering::SeqCst),