From 9f0d210021c54f63c9984446862b6ec68834bc63 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 22 Feb 2026 11:07:42 +0900 Subject: refactor(async): migrate from blocking HTTP to async/await with tokio Replace reqwest::blocking with async reqwest across the entire codebase. All command execute functions, registry API calls (packagist, downloader, resolver, lockfile), and the main entry point now use async/await with the tokio runtime. The pubgrub resolver runs on spawn_blocking since its DependencyProvider trait is synchronous, using Handle::block_on for async I/O within that context. Co-Authored-By: Claude Opus 4.6 --- crates/mozart/src/commands/search.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/mozart/src/commands/search.rs') diff --git a/crates/mozart/src/commands/search.rs b/crates/mozart/src/commands/search.rs index 98189ff..a8edc86 100644 --- a/crates/mozart/src/commands/search.rs +++ b/crates/mozart/src/commands/search.rs @@ -59,7 +59,7 @@ fn passes_only_vendor(result: &SearchResult, query: &str) -> bool { vendor.eq_ignore_ascii_case(query) } -pub fn execute( +pub async fn execute( args: &SearchArgs, _cli: &super::Cli, _console: &mozart_core::console::Console, @@ -67,7 +67,7 @@ pub fn execute( let query = args.tokens.join(" "); let (all_results, total) = - mozart_registry::packagist::search_packages(&query, args.r#type.as_deref())?; + mozart_registry::packagist::search_packages(&query, args.r#type.as_deref()).await?; // Apply client-side filters let mut results: Vec<&SearchResult> = all_results.iter().collect(); -- cgit v1.3.1