diff --git a/src/components/commitlist.rs b/src/components/commitlist.rs index b2d0806f..78f227da 100644 --- a/src/components/commitlist.rs +++ b/src/components/commitlist.rs @@ -24,7 +24,7 @@ use tui::{ Frame, }; -const ELEMENTS_PER_LINE: usize = 10; +const ELEMENTS_PER_LINE: usize = 9; /// pub struct CommitList { @@ -235,8 +235,7 @@ impl CommitList { now: DateTime, marked: Option, ) -> Spans<'a> { - let mut txt: Vec = Vec::new(); - txt.reserve( + let mut txt: Vec = Vec::with_capacity( ELEMENTS_PER_LINE + if marked.is_some() { 2 } else { 0 }, );