mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
make more use of generics
This commit is contained in:
@ -19,7 +19,7 @@ type CommitFileTree struct {
|
||||
tree *CommitFileNode
|
||||
showTree bool
|
||||
log *logrus.Entry
|
||||
collapsedPaths CollapsedPaths
|
||||
collapsedPaths *CollapsedPaths
|
||||
}
|
||||
|
||||
var _ ICommitFileTree = &CommitFileTree{}
|
||||
@ -29,7 +29,7 @@ func NewCommitFileTree(getFiles func() []*models.CommitFile, log *logrus.Entry,
|
||||
getFiles: getFiles,
|
||||
log: log,
|
||||
showTree: showTree,
|
||||
collapsedPaths: CollapsedPaths{},
|
||||
collapsedPaths: NewCollapsedPaths(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ func (self *CommitFileTree) Tree() INode {
|
||||
return self.tree
|
||||
}
|
||||
|
||||
func (self *CommitFileTree) CollapsedPaths() CollapsedPaths {
|
||||
func (self *CommitFileTree) CollapsedPaths() *CollapsedPaths {
|
||||
return self.collapsedPaths
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user