- io.rs: factor the pending-RPC-replies map into a PendingReplies type alias (type_complexity) - lua_env.rs: drop a redundant i64->i64 cast and an unneeded borrow before create_string (unnecessary_cast, needless_borrows_for_generic_args) - state_engine.rs: iterate watches.values() instead of discarding the key from watches.iter() (for_kv_map) - module_host_sandbox.rs: collapse nested if into a single condition (collapsible_if) (cherry picked from commit 49063cb98ddfeae35d842a6cf439123cfda763d9)
This commit is contained in:
parent
e073a17353
commit
72afe790fd
4 changed files with 10 additions and 9 deletions
|
|
@ -260,7 +260,7 @@ pub async fn run_state_engine(
|
|||
}
|
||||
|
||||
if let (Some(before), Some(after)) = (before_snapshot, after_snapshot) {
|
||||
for (_id, path) in watches.iter() {
|
||||
for path in watches.values() {
|
||||
let old_val = value_at_path(&before, path).unwrap_or(Value::Null);
|
||||
let new_val = value_at_path(&after, path).unwrap_or(Value::Null);
|
||||
if old_val != new_val {
|
||||
|
|
|
|||
|
|
@ -137,10 +137,8 @@ enabled = false
|
|||
async fn wait_until_ready(&self) -> Result<()> {
|
||||
let deadline = Instant::now() + Duration::from_secs(8);
|
||||
while Instant::now() < deadline {
|
||||
if self.socket_path.exists() {
|
||||
if self.send_request("ping", json!({})).await.is_ok() {
|
||||
return Ok(());
|
||||
}
|
||||
if self.socket_path.exists() && self.send_request("ping", json!({})).await.is_ok() {
|
||||
return Ok(());
|
||||
}
|
||||
sleep(Duration::from_millis(100)).await;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue