mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 02:11:54 +00:00
code review edits
This commit is contained in:
committed by
Aiden McClelland
parent
d952ee89f2
commit
3b1e4b3534
@@ -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"
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user