(text: &str, open_pos: usize)
| 3242 | } |
| 3243 | |
| 3244 | fn find_close_paren(text: &str, open_pos: usize) -> Option<usize> { |
| 3245 | let mut depth = 1_i32; |
| 3246 | for (offset, ch) in text[open_pos + 1..].char_indices() { |
| 3247 | if ch == '(' { |
| 3248 | depth += 1; |
| 3249 | } else if ch == ')' { |
| 3250 | depth -= 1; |
| 3251 | if depth == 0 { |
| 3252 | return Some(open_pos + 1 + offset); |
| 3253 | } |
| 3254 | } |
| 3255 | } |
| 3256 | None |
| 3257 | } |
| 3258 | |
| 3259 | fn find_close_paren_multiline( |
| 3260 | lines: &[String], |
no outgoing calls
no test coverage detected