// TDD: Test Vec<string> element comparison with borrowed param
// This should reproduce the exact Bug #5 scenario
fn find_in_vec(items: Vec<string>, target: string) -> bool {
let mut i = 0;
while i < items.len() {
if items[i] == target { // Vec element (String) == borrowed param (&String)
return true;
}
i += 1;
}
return false;
}
fn main() {
let items = vec!["hello".to_string(), "world".to_string()];
let result = find_in_vec(items, "hello".to_string());
println!("Result: {}", result);
}