mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-08 07:08:44 +00:00
Merge pull request #66 from PR0M3TH3AN/codex/fix-rustfmt-formatting-issues
Format watcher module
This commit is contained in:
@@ -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),
|
||||||
|
Reference in New Issue
Block a user