mirror of
https://github.com/extrawurst/gitui.git
synced 2024-11-23 03:32:30 +03:00
fix capacity
This commit is contained in:
parent
7e9c988f50
commit
60d512a5b3
@ -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<Local>,
|
||||
marked: Option<bool>,
|
||||
) -> Spans<'a> {
|
||||
let mut txt: Vec<Span> = Vec::new();
|
||||
txt.reserve(
|
||||
let mut txt: Vec<Span> = Vec::with_capacity(
|
||||
ELEMENTS_PER_LINE + if marked.is_some() { 2 } else { 0 },
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user