```
style(map_settings): 格式化代码风格,添加空格并展开单行语句 - 在赋值语句的等号两侧添加空格 - 将 if 语句的单行写法展开为多行格式 ```
This commit is contained in:
@@ -330,9 +330,11 @@ async fn poll(s: Shared) {
|
||||
Ok(v) => {
|
||||
s.borrow_mut().available = v["available"].as_bool().unwrap_or(false);
|
||||
let j = &v["job"];
|
||||
let was_running=s.borrow().running;
|
||||
let was_running = s.borrow().running;
|
||||
s.borrow_mut().running = j["state"] == "running";
|
||||
if was_running && j["state"] == "completed" { map("refresh", &Value::Null); }
|
||||
if was_running && j["state"] == "completed" {
|
||||
map("refresh", &Value::Null);
|
||||
}
|
||||
if j.is_object() {
|
||||
let state = j["state"].as_str().unwrap_or("");
|
||||
message(
|
||||
|
||||
Reference in New Issue
Block a user