INNER CODE UNIT · Rust

Ok

mouseart2025/AI-Reader-V2 · frontend/src-tauri/src/lib.rs:603

    if let Ok(bytes) = std::fs::read(&bundled_path) {
      if let Ok(manifest) = serde_json::from_slice::<serde_json::Value>(&bytes) {
        if let Some(novels) = manifest.get("novels").and_then(|v| v.as_array()) {
          return novels.iter().any(|n| {
            n.get("slug").and_then(|v| v.as_str()) == Some(slug)
          });
        }
      }
    }
  }
  false
}

/// Remove a novel entry from the user manifest by slug
fn remove_from_manifest(novels_dir: &PathBuf, slug: &str) -> Result<(), String> {
  let manifest_path = novels_dir.join("manifest.json");
  if !manifest_path.exists() {
    return Ok(());

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…