You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9f71fdd
Browse filesBrowse the repository at this point in the historyBrowse files
fallback_reason:Some("请求后端 Cuda 构建失败".to_string()),
269
+
engine_ready:false,
270
+
bench:None,
271
+
calibrating:false,
272
+
};
273
+
let json = serde_json::to_string(&s).unwrap();
274
+
let back:OcrDeviceStatus = serde_json::from_str(&json).unwrap();
275
+
assert_eq!(back, s);
276
+
// 无 engine_ready 键的旧载荷 → false(不阻断反序列化)
277
+
let legacy = r#"{"mode":"Auto","requested":{"Cuda":{"device_id":0}},"actual":{"Cuda":{"device_id":0}},"fallback_reason":null,"bench":null,"calibrating":false}"#;
278
+
let from_legacy:OcrDeviceStatus = serde_json::from_str(legacy).unwrap();
0 commit comments