Skip to content

Commit c1cfd8b

Browse files
committed
Fix gloc clippy on release stack (#202)
1 parent 91518ce commit c1cfd8b

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

crates/gloc/src/backend.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,15 @@ fn ollama_check_model(backend: &Backend, model: &str, timeout_ms: u64) -> Result
119119

120120
// Check if loaded in memory via /api/ps
121121
let ps_url = format!("{}/api/ps", backend.url);
122-
if let Ok(ps_resp) = agent.get(&ps_url).call() {
123-
if let Ok(ps_json) = ps_resp.into_json::<serde_json::Value>() {
124-
let loaded = ps_json
125-
.get("models")
126-
.and_then(|v| v.as_array())
127-
.map(|arr| arr.iter().any(|m| model_name_matches(m, model)))
128-
.unwrap_or(false);
129-
return Ok(loaded);
130-
}
122+
if let Ok(ps_resp) = agent.get(&ps_url).call()
123+
&& let Ok(ps_json) = ps_resp.into_json::<serde_json::Value>()
124+
{
125+
let loaded = ps_json
126+
.get("models")
127+
.and_then(|v| v.as_array())
128+
.map(|arr| arr.iter().any(|m| model_name_matches(m, model)))
129+
.unwrap_or(false);
130+
return Ok(loaded);
131131
}
132132

133133
Ok(false)

0 commit comments

Comments
 (0)