(value: &str)
| 456 | } |
| 457 | |
| 458 | fn unquote(value: &str) -> Option<String> { |
| 459 | let value = value.trim(); |
| 460 | let stripped = if (value.starts_with('\"') && value.ends_with('\"')) |
| 461 | || (value.starts_with('\'') && value.ends_with('\'')) |
| 462 | || (value.starts_with('`') && value.ends_with('`')) |
| 463 | || (value.starts_with('<') && value.ends_with('>')) |
| 464 | { |
| 465 | &value[1..value.len().checked_sub(1)?] |
| 466 | } else { |
| 467 | value |
| 468 | }; |
| 469 | if stripped.is_empty() || stripped.contains(['\\', '$', '\n']) { |
| 470 | None |
| 471 | } else { |
| 472 | Some(stripped.into()) |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | /// Distinct explicit dependency units, not a type-resolved coupling metric. |
| 477 | fn rust_roots(node: Node<'_>, source: &str, result: &mut BTreeSet<String>) { |
no test coverage detected