Function
qualified_path
(value: &str, separator: &str)
Source from the content-addressed store, hash-verified
| 112 | } |
| 113 | |
| 114 | pub(crate) fn qualified_path(value: &str, separator: &str) -> Option<Vec<String>> { |
| 115 | let parts: Vec<_> = value |
| 116 | .trim() |
| 117 | .trim_start_matches("::") |
| 118 | .split(separator) |
| 119 | .map(str::trim) |
| 120 | .collect(); |
| 121 | parts |
| 122 | .iter() |
| 123 | .all(|part| { |
| 124 | !part.is_empty() |
| 125 | && part |
| 126 | .chars() |
| 127 | .all(|ch| ch.is_alphanumeric() || ch == '_' || ch == '#') |
| 128 | }) |
| 129 | .then(|| parts.into_iter().map(str::to_owned).collect()) |
| 130 | } |
| 131 | |
| 132 | fn callable(node: Node<'_>) -> bool { |
| 133 | matches!( |
Tested by
no test coverage detected