perf: avoid unnecessary allocations in code highlighting (#3804)

This commit is contained in:
sxyazi 2026-03-23 18:06:04 +08:00
parent d4924ebcad
commit 5c05350d52
No known key found for this signature in database
18 changed files with 655 additions and 241 deletions

View file

@ -51,6 +51,12 @@ impl Line {
}
}
impl From<ratatui::text::Line<'static>> for Line {
fn from(value: ratatui::text::Line<'static>) -> Self {
Self { inner: value, ..Default::default() }
}
}
impl TryFrom<Table> for Line {
type Error = mlua::Error;