diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-08 00:44:49 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-08 00:44:49 +0300 |
| commit | d6285aaa59e0f7908c2ece81314aff2b98847e31 (patch) | |
| tree | ec1306441ebb87592ff120e2bd34c55028f1fd33 /src/app/actions.rs | |
| parent | 35e9838a44470c418ae51204bab54115d15d87bd (diff) | |
fix: avoid render-time plain url scans
Diffstat (limited to 'src/app/actions.rs')
| -rw-r--r-- | src/app/actions.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/app/actions.rs b/src/app/actions.rs index 12c0df87..5c263e7e 100644 --- a/src/app/actions.rs +++ b/src/app/actions.rs @@ -2122,20 +2122,6 @@ pub(crate) fn url_at_column(row: &str, col: u16) -> Option<&str> { safe_web_url(row.get(start_byte..end_byte)?) } -pub(crate) fn visible_url_spans(row: &str) -> Vec<(u16, u16, &str)> { - let cells = text_cells(row); - url_spans(&cells) - .into_iter() - .filter_map(|span| { - let start_byte = byte_index_for_cell(row, span.start); - let end_byte = byte_index_after_cell(row, span.end); - let url = row.get(start_byte..end_byte).and_then(safe_web_url)?; - let (start_col, end_col) = span.columns(&cells); - Some((start_col, end_col, url)) - }) - .collect() -} - fn url_spans(cells: &[TextCell]) -> Vec<CellSpan> { let mut spans = Vec::new(); let mut start = 0; |
