Drop 'else' condition when 'if' ends with a return (#4743)
This commit drops the else condition when the if block ends with a return statement. Signed-off-by: Vandewilly Silva <vandewilly.oli.silva@hpe.com>
This commit is contained in:
parent
69656c295d
commit
1098ed89d8
|
@ -149,9 +149,8 @@ func (vec Vector) ContainsSameLabelset() bool {
|
|||
hash := s.Metric.Hash()
|
||||
if _, ok := l[hash]; ok {
|
||||
return true
|
||||
} else {
|
||||
l[hash] = struct{}{}
|
||||
}
|
||||
l[hash] = struct{}{}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -193,9 +192,8 @@ func (m Matrix) ContainsSameLabelset() bool {
|
|||
hash := ss.Metric.Hash()
|
||||
if _, ok := l[hash]; ok {
|
||||
return true
|
||||
} else {
|
||||
l[hash] = struct{}{}
|
||||
}
|
||||
l[hash] = struct{}{}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue