Fix clippy warnings across workspace
Some checks failed
dev release / build (push) Failing after 7s

- 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:
Breadway 2026-08-06 08:46:41 +08:00
parent e073a17353
commit 72afe790fd
4 changed files with 10 additions and 9 deletions

View file

@ -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;
}