File tree Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Expand file tree Collapse file tree 6 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ type MainBranches struct {
21
21
previousMainBranches []string
22
22
23
23
cmd oscommands.ICmdObjBuilder
24
- mutex * deadlock.Mutex
24
+ mutex deadlock.Mutex
25
25
}
26
26
27
27
func NewMainBranches (
@@ -32,7 +32,6 @@ func NewMainBranches(
32
32
c : cmn ,
33
33
existingMainBranches : nil ,
34
34
cmd : cmd ,
35
- mutex : & deadlock.Mutex {},
36
35
}
37
36
}
38
37
Original file line number Diff line number Diff line change @@ -16,14 +16,13 @@ type FilteredList[T any] struct {
16
16
getFilterFields func (T ) []string
17
17
filter string
18
18
19
- mutex * deadlock.Mutex
19
+ mutex deadlock.Mutex
20
20
}
21
21
22
22
func NewFilteredList [T any ](getList func () []T , getFilterFields func (T ) []string ) * FilteredList [T ] {
23
23
return & FilteredList [T ]{
24
24
getList : getList ,
25
25
getFilterFields : getFilterFields ,
26
- mutex : & deadlock.Mutex {},
27
26
}
28
27
}
29
28
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type MergeConflictsContext struct {
12
12
types.Context
13
13
viewModel * ConflictsViewModel
14
14
c * ContextCommon
15
- mutex * deadlock.Mutex
15
+ mutex deadlock.Mutex
16
16
}
17
17
18
18
type ConflictsViewModel struct {
@@ -33,7 +33,6 @@ func NewMergeConflictsContext(
33
33
34
34
return & MergeConflictsContext {
35
35
viewModel : viewModel ,
36
- mutex : & deadlock.Mutex {},
37
36
Context : NewSimpleContext (
38
37
NewBaseContext (NewBaseContextOpts {
39
38
Kind : types .MAIN_CONTEXT ,
@@ -57,7 +56,7 @@ func (self *MergeConflictsContext) SetState(state *mergeconflicts.State) {
57
56
}
58
57
59
58
func (self * MergeConflictsContext ) GetMutex () * deadlock.Mutex {
60
- return self .mutex
59
+ return & self .mutex
61
60
}
62
61
63
62
func (self * MergeConflictsContext ) SetUserScrolling (isScrolling bool ) {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type PatchExplorerContext struct {
15
15
viewTrait * ViewTrait
16
16
getIncludedLineIndices func () []int
17
17
c * ContextCommon
18
- mutex * deadlock.Mutex
18
+ mutex deadlock.Mutex
19
19
}
20
20
21
21
var (
@@ -36,7 +36,6 @@ func NewPatchExplorerContext(
36
36
state : nil ,
37
37
viewTrait : NewViewTrait (view ),
38
38
c : c ,
39
- mutex : & deadlock.Mutex {},
40
39
getIncludedLineIndices : getIncludedLineIndices ,
41
40
SimpleContext : NewSimpleContext (NewBaseContext (NewBaseContextOpts {
42
41
View : view ,
@@ -137,7 +136,7 @@ func (self *PatchExplorerContext) NavigateTo(selectedLineIdx int) {
137
136
}
138
137
139
138
func (self * PatchExplorerContext ) GetMutex () * deadlock.Mutex {
140
- return self .mutex
139
+ return & self .mutex
141
140
}
142
141
143
142
func (self * PatchExplorerContext ) ModelSearchResults (searchStr string , caseSensitive bool ) []gocui.SearchPosition {
Original file line number Diff line number Diff line change @@ -15,15 +15,14 @@ type InlineStatusHelper struct {
15
15
16
16
windowHelper * WindowHelper
17
17
contextsWithInlineStatus map [types.ContextKey ]* inlineStatusInfo
18
- mutex * deadlock.Mutex
18
+ mutex deadlock.Mutex
19
19
}
20
20
21
21
func NewInlineStatusHelper (c * HelperCommon , windowHelper * WindowHelper ) * InlineStatusHelper {
22
22
return & InlineStatusHelper {
23
23
c : c ,
24
24
windowHelper : windowHelper ,
25
25
contextsWithInlineStatus : make (map [types.ContextKey ]* inlineStatusInfo ),
26
- mutex : & deadlock.Mutex {},
27
26
}
28
27
}
29
28
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ type Gui struct {
118
118
// is being pushed). At the moment the rule is to use an item operation when
119
119
// we need to talk to the remote.
120
120
itemOperations map [string ]types.ItemOperation
121
- itemOperationsMutex * deadlock.Mutex
121
+ itemOperationsMutex deadlock.Mutex
122
122
123
123
PrevLayout PrevLayout
124
124
@@ -684,8 +684,7 @@ func NewGui(
684
684
InitialDir : initialDir ,
685
685
afterLayoutFuncs : make (chan func () error , 1000 ),
686
686
687
- itemOperations : make (map [string ]types.ItemOperation ),
688
- itemOperationsMutex : & deadlock.Mutex {},
687
+ itemOperations : make (map [string ]types.ItemOperation ),
689
688
}
690
689
691
690
gui .PopupHandler = popup .NewPopupHandler (
You can’t perform that action at this time.
0 commit comments