1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

Instantiate other mutexes by value

Like in the previous commit, this is preferred because the fields don't need to
be initialized this way.
This commit is contained in:
Stefan Haller
2025-06-09 16:16:20 +02:00
parent 5ee5d42511
commit fd270768e8
6 changed files with 9 additions and 15 deletions

View File

@@ -118,7 +118,7 @@ type Gui struct {
// is being pushed). At the moment the rule is to use an item operation when
// we need to talk to the remote.
itemOperations map[string]types.ItemOperation
itemOperationsMutex *deadlock.Mutex
itemOperationsMutex deadlock.Mutex
PrevLayout PrevLayout
@@ -684,8 +684,7 @@ func NewGui(
InitialDir: initialDir,
afterLayoutFuncs: make(chan func() error, 1000),
itemOperations: make(map[string]types.ItemOperation),
itemOperationsMutex: &deadlock.Mutex{},
itemOperations: make(map[string]types.ItemOperation),
}
gui.PopupHandler = popup.NewPopupHandler(