mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
perf: avoid unnecessary allocations in code highlighting (#3804)
This commit is contained in:
parent
d4924ebcad
commit
5c05350d52
18 changed files with 655 additions and 241 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue