Skip to content

Commit 3722f2e

Browse files
committed
Remove CommitList::marked() to avoid exposing internal structure
1 parent ab673a6 commit 3722f2e

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

src/components/commitlist.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,6 @@ impl CommitList {
116116
self.marked.len()
117117
}
118118

119-
///
120-
#[expect(
121-
clippy::missing_const_for_fn,
122-
reason = "as of 1.86.0 clippy wants this to be const even though that breaks"
123-
)]
124-
pub fn marked(&self) -> &[(usize, CommitId)] {
125-
&self.marked
126-
}
127-
128119
///
129120
pub fn clear_marked(&mut self) {
130121
self.marked.clear();

src/tabs/revlog.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,19 +586,19 @@ impl Component for Revlog {
586586
self.queue.push(InternalEvent::OpenPopup(
587587
StackablePopupOpen::CompareCommits(
588588
InspectCommitOpen::new(
589-
self.list.marked()[0].1,
589+
self.list.marked_commits()[0],
590590
),
591591
),
592592
));
593593
return Ok(EventState::Consumed);
594594
} else if self.list.marked_count() == 2 {
595595
//compare two marked commits
596-
let marked = self.list.marked();
596+
let marked = self.list.marked_commits();
597597
self.queue.push(InternalEvent::OpenPopup(
598598
StackablePopupOpen::CompareCommits(
599599
InspectCommitOpen {
600-
commit_id: marked[0].1,
601-
compare_id: Some(marked[1].1),
600+
commit_id: marked[0],
601+
compare_id: Some(marked[1]),
602602
tags: None,
603603
},
604604
),

0 commit comments

Comments
 (0)