move closure out of match

This commit is contained in:
zyl 2024-04-02 13:32:21 -07:00
parent 61f7cd4d08
commit 71a6556484
No known key found for this signature in database
GPG key ID: 8611B896D1AAFAF2

View file

@ -163,7 +163,7 @@ impl Site {
.watch(site.site_path.clone(), move |event| {
let peers = hw_peers.clone();
match (|| {
let r = (|| {
let path = event
.paths
.first()
@ -221,7 +221,9 @@ impl Site {
// }
_ => Ok(false),
}
})() {
})();
match r {
Ok(reload) => {
if reload {
// Send reload event to connected websockets