fix: cargo check --lib error

This commit is contained in:
imeepos
2025-08-08 18:16:52 +08:00
parent 45041a838b
commit 3bb7cdae23
10 changed files with 152 additions and 44 deletions

View File

@@ -80,6 +80,7 @@ pub struct SystemInfo {
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DeviceInfo {
pub name: String,
#[serde(default = "default_device_type")]
pub device_type: String,
pub vram_total: u64,
pub vram_free: u64,
@@ -87,6 +88,11 @@ pub struct DeviceInfo {
pub torch_vram_free: u64,
}
/// Default device type when not provided by ComfyUI
fn default_device_type() -> String {
"unknown".to_string()
}
/// Object info response
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ObjectInfo {