From 09b83d6449c4c44fdff19b6479e486311184c0ea Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 7 Jul 2025 14:30:27 +0300 Subject: [PATCH] delegate validation to the api level --- src/api.rs | 3 +++ src/main.rs | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api.rs b/src/api.rs index b9be999..15c6422 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,6 +1,9 @@ /// Parse infohash from the source filepath, /// decode JSON to array on success pub fn infohashes(path: &str) -> anyhow::Result> { + if path.contains("://") { + todo!("URL sources yet not supported") + } let mut f = std::fs::File::open(path)?; let mut s = String::new(); diff --git a/src/main.rs b/src/main.rs index 03bef7b..deef53d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,9 +78,6 @@ async fn main() -> Result<()> { debug.info("Index queue begin..."); index.refresh(); for source in &config.infohash { - if source.contains("://") { - todo!("URL sources yet not supported") - } debug.info(&format!("Index source `{source}`...")); // grab latest info-hashes from this source // * aquatic server may update the stats at this moment, handle result manually