code review edits

This commit is contained in:
Keagan McClelland
2021-12-14 15:51:46 -07:00
committed by Aiden McClelland
parent d952ee89f2
commit 3b1e4b3534
2 changed files with 8 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ trace = ["debug", "tracing-error"]
async-trait = "0.1.42" async-trait = "0.1.42"
fd-lock-rs = "0.1.3" fd-lock-rs = "0.1.3"
futures = "0.3.8" futures = "0.3.8"
im = "*" imbl = "1.0.1"
json-patch = { path = "../json-patch" } json-patch = { path = "../json-patch" }
json-ptr = { path = "../json-ptr" } json-ptr = { path = "../json-ptr" }
lazy_static = "1.4.0" lazy_static = "1.4.0"

View File

@@ -1,6 +1,6 @@
use std::collections::{BTreeMap, VecDeque}; use std::collections::{BTreeMap, VecDeque};
use im::{ordset, OrdSet}; use imbl::{ordset, OrdSet};
use json_ptr::{JsonPointer, SegList}; use json_ptr::{JsonPointer, SegList};
use tokio::sync::{mpsc, oneshot}; use tokio::sync::{mpsc, oneshot};
@@ -73,7 +73,9 @@ impl Locker {
&mut locks_on_lease, &mut locks_on_lease,
&mut request_queue, &mut request_queue,
); );
hot_seat.map_or((), |a| request_queue.push_front(a)); if let Some(hot_seat) = hot_seat {
request_queue.push_front(hot_seat);
}
} }
Action::HandleRelease(lock_info) => { Action::HandleRelease(lock_info) => {
// release actual lock // release actual lock
@@ -106,7 +108,9 @@ impl Locker {
&mut request_queue, &mut request_queue,
) )
} }
hot_seat.map_or((), |a| request_queue.push_front(a)); if let Some(hot_seat) = hot_seat {
request_queue.push_front(hot_seat);
}
} }
} }
Action::HandleCancel(lock_info) => { Action::HandleCancel(lock_info) => {