(rest: &str)
| 122 | } |
| 123 | |
| 124 | fn parse_include_arg(rest: &str) -> Option<String> { |
| 125 | let rest = rest.trim(); |
| 126 | let first = rest.chars().next()?; |
| 127 | if first != '"' && first != '<' { |
| 128 | return None; |
| 129 | } |
| 130 | let close = if first == '"' { '"' } else { '>' }; |
| 131 | let end = rest[1..].find(close)? + 1; |
| 132 | Some(rest[1..end].to_string()) |
| 133 | } |
| 134 | |
| 135 | #[cfg(test)] |
| 136 | mod tests { |