(text: &str)
| 1 | pub fn project_main_scene(text: &str) -> Option<String> { |
| 2 | let mut in_project = false; |
| 3 | for line in text.lines() { |
| 4 | let trimmed = line.trim(); |
| 5 | if trimmed == "[project]" { |
| 6 | in_project = true; |
| 7 | continue; |
| 8 | } |
| 9 | if in_project && trimmed.starts_with('[') { |
| 10 | return None; |
| 11 | } |
| 12 | if in_project && trimmed.starts_with("main_scene") { |
| 13 | let (_, value) = trimmed.split_once('=')?; |
| 14 | let value = value.trim().trim_matches('"').to_string(); |
| 15 | return (!value.is_empty()).then_some(value); |
| 16 | } |
| 17 | } |
| 18 | None |
| 19 | } |
no test coverage detected