mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-07 14:48:44 +00:00
Format watcher module
This commit is contained in:
@@ -520,15 +520,16 @@ impl FileWatcher {
|
||||
let _ = h.join();
|
||||
}
|
||||
|
||||
*self
|
||||
.state
|
||||
.lock()
|
||||
.map_err(|_| anyhow::anyhow!("state"))? = WatcherState::Stopped;
|
||||
*self.state.lock().map_err(|_| anyhow::anyhow!("state"))? = WatcherState::Stopped;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
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 {
|
||||
state: st,
|
||||
events_processed: self.events_processed.load(Ordering::SeqCst),
|
||||
|
Reference in New Issue
Block a user