@smbcloud / cli / commits / c85b39a

Add comment clarification

Seto Elkahfi committed Aug 25, 2026 at 14:23 UTC c85b39a97c8a3e902d92f6b7272b1d4637ef8bb7
1 file changed +2
crates/xcrs/src/xcrs.rs
+2
@@ -216,6 +216,8 @@ fn is_controlkit_method_not_found(error: &serde_json::Value) -> bool {
216 return false;
217 };
218
219 + // Some runners serialise the JSON-RPC code as an integral float (e.g. `-32601.0`),
220 + // which `as_i64` rejects, so fall back to an exact `as_f64` comparison for that case.
221 code.as_i64() == Some(CONTROLKIT_METHOD_NOT_FOUND)
222 || code.as_f64() == Some(CONTROLKIT_METHOD_NOT_FOUND as f64)
223 }