mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
move closure out of match
This commit is contained in:
parent
61f7cd4d08
commit
71a6556484
1 changed files with 4 additions and 2 deletions
|
@ -163,7 +163,7 @@ impl Site {
|
||||||
.watch(site.site_path.clone(), move |event| {
|
.watch(site.site_path.clone(), move |event| {
|
||||||
let peers = hw_peers.clone();
|
let peers = hw_peers.clone();
|
||||||
|
|
||||||
match (|| {
|
let r = (|| {
|
||||||
let path = event
|
let path = event
|
||||||
.paths
|
.paths
|
||||||
.first()
|
.first()
|
||||||
|
@ -221,7 +221,9 @@ impl Site {
|
||||||
// }
|
// }
|
||||||
_ => Ok(false),
|
_ => Ok(false),
|
||||||
}
|
}
|
||||||
})() {
|
})();
|
||||||
|
|
||||||
|
match r {
|
||||||
Ok(reload) => {
|
Ok(reload) => {
|
||||||
if reload {
|
if reload {
|
||||||
// Send reload event to connected websockets
|
// Send reload event to connected websockets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue