diff --git a/crates/cli/src/tui/components/history.rs b/crates/cli/src/tui/components/history.rs index 6785e2aa..ba63ce05 100644 --- a/crates/cli/src/tui/components/history.rs +++ b/crates/cli/src/tui/components/history.rs @@ -1,5 +1,5 @@ -use git_next_core::git::graph::Log; // +use git_next_core::git::graph::Log; use ratatui::{ text::{Line, Text}, widgets::{Paragraph, Widget}, @@ -23,10 +23,24 @@ impl<'a> Widget for CommitLog<'a> { Paragraph::new(Text::from( self.log .iter() - .map(ToString::to_string) + .map(LogLine::new) .map(Line::from) .collect::>(), )) .render(area, buf); } } + +struct LogLine { + raw: String, +} +impl LogLine { + fn new(raw: impl Into) -> Self { + Self { raw: raw.into() } + } +} +impl From for Line<'_> { + fn from(value: LogLine) -> Self { + Line::from(value.raw) + } +}