Find the start of the line containing `offset`.
(content: &str, offset: usize)
| 861 | |
| 862 | /// Find the start of the line containing `offset`. |
| 863 | fn find_line_start(content: &str, offset: usize) -> usize { |
| 864 | content[..offset].rfind('\n').map_or(0, |p| p + 1) |
| 865 | } |
| 866 | |
| 867 | /// Extract the indentation (leading whitespace) of the line at `offset`. |
| 868 | fn indent_at(content: &str, offset: usize) -> String { |
no outgoing calls
no test coverage detected