Skip to content

Commit 71ec109

Browse files
committed
fix(test): wrap SearchConfig in Arc for test_web_search_headless
Fixes compilation error where search_config field expects Option<Arc<SearchConfig>> but was receiving Option<SearchConfig>. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 342b1cc commit 71ec109

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

core/tests/test_web_search_headless.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ use a3s_code_core::tools::{ToolContext, ToolExecutor};
88

99
use std::collections::HashMap;
1010
use std::path::PathBuf;
11+
use std::sync::Arc;
1112

1213
/// Helper to create a ToolContext with headless search config
1314
fn make_context(headless: Option<HeadlessConfig>) -> ToolContext {
14-
let search_config = headless.map(|h| SearchConfig {
15-
timeout: 30,
16-
health: None,
17-
engines: HashMap::new(),
18-
headless: Some(h),
15+
let search_config = headless.map(|h| {
16+
Arc::new(SearchConfig {
17+
timeout: 30,
18+
health: None,
19+
engines: HashMap::new(),
20+
headless: Some(h),
21+
})
1922
});
2023

2124
ToolContext {

0 commit comments

Comments
 (0)