| 401 | } |
| 402 | |
| 403 | fn parse_string_array(json: &str) -> Vec<String> { |
| 404 | let trimmed = json.trim(); |
| 405 | if !trimmed.starts_with('[') || !trimmed.ends_with(']') { |
| 406 | return vec![]; |
| 407 | } |
| 408 | let inner = &trimmed[1..trimmed.len() - 1]; |
| 409 | let mut result = vec![]; |
| 410 | let mut current = String::new(); |
| 411 | let mut in_string = false; |
| 412 | let mut escape_next = false; |
| 413 | |
| 414 | for ch in inner.chars() { |
| 415 | if escape_next { |
| 416 | current.push(ch); |
| 417 | escape_next = false; |
| 418 | continue; |
| 419 | } |
| 420 | if ch == '\\' && in_string { |
| 421 | escape_next = true; |
| 422 | continue; |
| 423 | } |
| 424 | if ch == '"' { |
| 425 | if in_string { |
| 426 | result.push(current.clone()); |
| 427 | current.clear(); |
| 428 | } |
| 429 | in_string = !in_string; |
| 430 | continue; |
| 431 | } |
| 432 | if in_string { |
| 433 | current.push(ch); |
| 434 | } |
| 435 | } |
| 436 | result |
| 437 | } |
| 438 | |
| 439 | fn check_dep_hashes_changed(dep_globs: &[String], hashes: &HashMap<String, String>) -> bool { |
| 440 | for pattern in dep_globs { |