mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 00:57:52 +02:00
Instantiate Mutexes's fields by value
Instead, pass the entire Mutexes struct by pointer to controllers. This is better because Mutexes now has a zero value and doesn't need to be initialized.
This commit is contained in:
@ -681,17 +681,6 @@ func NewGui(
|
||||
// real value after loading the user config:
|
||||
ShowExtrasWindow: true,
|
||||
|
||||
Mutexes: types.Mutexes{
|
||||
RefreshingFilesMutex: &deadlock.Mutex{},
|
||||
RefreshingBranchesMutex: &deadlock.Mutex{},
|
||||
RefreshingStatusMutex: &deadlock.Mutex{},
|
||||
LocalCommitsMutex: &deadlock.Mutex{},
|
||||
SubCommitsMutex: &deadlock.Mutex{},
|
||||
AuthorsMutex: &deadlock.Mutex{},
|
||||
SubprocessMutex: &deadlock.Mutex{},
|
||||
PopupMutex: &deadlock.Mutex{},
|
||||
PtyMutex: &deadlock.Mutex{},
|
||||
},
|
||||
InitialDir: initialDir,
|
||||
afterLayoutFuncs: make(chan func() error, 1000),
|
||||
|
||||
|
Reference in New Issue
Block a user