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 {
2121 previousMainBranches []string
2222
2323 cmd oscommands.ICmdObjBuilder
24- mutex * deadlock.Mutex
24+ mutex deadlock.Mutex
2525}
2626
2727func NewMainBranches (
@@ -32,7 +32,6 @@ func NewMainBranches(
3232 c : cmn ,
3333 existingMainBranches : nil ,
3434 cmd : cmd ,
35- mutex : & deadlock.Mutex {},
3635 }
3736}
3837
Original file line number Diff line number Diff line change @@ -16,14 +16,13 @@ type FilteredList[T any] struct {
1616 getFilterFields func (T ) []string
1717 filter string
1818
19- mutex * deadlock.Mutex
19+ mutex deadlock.Mutex
2020}
2121
2222func NewFilteredList [T any ](getList func () []T , getFilterFields func (T ) []string ) * FilteredList [T ] {
2323 return & FilteredList [T ]{
2424 getList : getList ,
2525 getFilterFields : getFilterFields ,
26- mutex : & deadlock.Mutex {},
2726 }
2827}
2928
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type MergeConflictsContext struct {
1212 types.Context
1313 viewModel * ConflictsViewModel
1414 c * ContextCommon
15- mutex * deadlock.Mutex
15+ mutex deadlock.Mutex
1616}
1717
1818type ConflictsViewModel struct {
@@ -33,7 +33,6 @@ func NewMergeConflictsContext(
3333
3434 return & MergeConflictsContext {
3535 viewModel : viewModel ,
36- mutex : & deadlock.Mutex {},
3736 Context : NewSimpleContext (
3837 NewBaseContext (NewBaseContextOpts {
3938 Kind : types .MAIN_CONTEXT ,
@@ -57,7 +56,7 @@ func (self *MergeConflictsContext) SetState(state *mergeconflicts.State) {
5756}
5857
5958func (self * MergeConflictsContext ) GetMutex () * deadlock.Mutex {
60- return self .mutex
59+ return & self .mutex
6160}
6261
6362func (self * MergeConflictsContext ) SetUserScrolling (isScrolling bool ) {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type PatchExplorerContext struct {
1515 viewTrait * ViewTrait
1616 getIncludedLineIndices func () []int
1717 c * ContextCommon
18- mutex * deadlock.Mutex
18+ mutex deadlock.Mutex
1919}
2020
2121var (
@@ -36,7 +36,6 @@ func NewPatchExplorerContext(
3636 state : nil ,
3737 viewTrait : NewViewTrait (view ),
3838 c : c ,
39- mutex : & deadlock.Mutex {},
4039 getIncludedLineIndices : getIncludedLineIndices ,
4140 SimpleContext : NewSimpleContext (NewBaseContext (NewBaseContextOpts {
4241 View : view ,
@@ -137,7 +136,7 @@ func (self *PatchExplorerContext) NavigateTo(selectedLineIdx int) {
137136}
138137
139138func (self * PatchExplorerContext ) GetMutex () * deadlock.Mutex {
140- return self .mutex
139+ return & self .mutex
141140}
142141
143142func (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 {
1515
1616 windowHelper * WindowHelper
1717 contextsWithInlineStatus map [types.ContextKey ]* inlineStatusInfo
18- mutex * deadlock.Mutex
18+ mutex deadlock.Mutex
1919}
2020
2121func NewInlineStatusHelper (c * HelperCommon , windowHelper * WindowHelper ) * InlineStatusHelper {
2222 return & InlineStatusHelper {
2323 c : c ,
2424 windowHelper : windowHelper ,
2525 contextsWithInlineStatus : make (map [types.ContextKey ]* inlineStatusInfo ),
26- mutex : & deadlock.Mutex {},
2726 }
2827}
2928
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ type Gui struct {
118118 // is being pushed). At the moment the rule is to use an item operation when
119119 // we need to talk to the remote.
120120 itemOperations map [string ]types.ItemOperation
121- itemOperationsMutex * deadlock.Mutex
121+ itemOperationsMutex deadlock.Mutex
122122
123123 PrevLayout PrevLayout
124124
@@ -684,8 +684,7 @@ func NewGui(
684684 InitialDir : initialDir ,
685685 afterLayoutFuncs : make (chan func () error , 1000 ),
686686
687- itemOperations : make (map [string ]types.ItemOperation ),
688- itemOperationsMutex : & deadlock.Mutex {},
687+ itemOperations : make (map [string ]types.ItemOperation ),
689688 }
690689
691690 gui .PopupHandler = popup .NewPopupHandler (
You can’t perform that action at this time.
0 commit comments