Skip to content

Commit

Permalink
Removed redundant variable assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalstead committed Jul 6, 2020
1 parent 07ae05c commit e7c9296
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dsquery/querymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,7 @@ func (qt *queryTemplate) closeFragmentToken() {
func (qt *queryTemplate) AddIndexedVar(index int) {

qt.closeFragmentToken()
t := qt.currentToken

t = newQueryTemplateToken(varIndexToken)
t := newQueryTemplateToken(varIndexToken)
t.Index = index

qt.Tokens = append(qt.Tokens, t)
Expand All @@ -487,9 +485,8 @@ func (qt *queryTemplate) AddIndexedVar(index int) {
func (qt *queryTemplate) AddLabelledVar(label string) {

qt.closeFragmentToken()
t := qt.currentToken

t = newQueryTemplateToken(varNameToken)
t := newQueryTemplateToken(varNameToken)
t.Content = label

qt.Tokens = append(qt.Tokens, t)
Expand Down

0 comments on commit e7c9296

Please sign in to comment.