mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 00:48:35 +00:00
fix one more TODO
This commit is contained in:
parent
586acc434d
commit
e68e5e2f46
4 changed files with 6 additions and 6 deletions
|
|
@ -92,7 +92,7 @@ impl CommitDetailsComponent {
|
|||
pub fn set_commits(
|
||||
&mut self,
|
||||
params: Option<CommitFilesParams>,
|
||||
tags: Option<CommitTags>,
|
||||
tags: &Option<CommitTags>,
|
||||
) -> Result<()> {
|
||||
if params.is_none() {
|
||||
self.single_details.set_commit(None, None);
|
||||
|
|
@ -106,7 +106,8 @@ impl CommitDetailsComponent {
|
|||
self.compare_details
|
||||
.set_commits(Some((id.id, other)));
|
||||
} else {
|
||||
self.single_details.set_commit(Some(id.id), tags);
|
||||
self.single_details
|
||||
.set_commit(Some(id.id), tags.clone());
|
||||
}
|
||||
|
||||
if let Some((fetched_id, res)) =
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ impl CompareCommitsComponent {
|
|||
fn update(&mut self) -> Result<()> {
|
||||
self.details.set_commits(
|
||||
self.get_ids().map(CommitFilesParams::from),
|
||||
None,
|
||||
&None,
|
||||
)?;
|
||||
self.update_diff()?;
|
||||
|
||||
|
|
|
|||
|
|
@ -318,10 +318,9 @@ impl InspectCommitComponent {
|
|||
|
||||
fn update(&mut self) -> Result<()> {
|
||||
if let Some(request) = &self.open_request {
|
||||
//TODO: pass as reference and only clone if details changed
|
||||
self.details.set_commits(
|
||||
Some(request.commit_id.into()),
|
||||
request.tags.clone(),
|
||||
&request.tags,
|
||||
)?;
|
||||
self.update_diff()?;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ impl Revlog {
|
|||
|
||||
self.commit_details.set_commits(
|
||||
commit.map(CommitFilesParams::from),
|
||||
tags,
|
||||
&tags,
|
||||
)?;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue