mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Remove unnecessary sort
Signed-off-by: Xiaochao Dong (@damnever) <the.xcdong@gmail.com>
This commit is contained in:
parent
c4da9cd92f
commit
36fc1158b5
|
@ -411,7 +411,6 @@ func FromStrings(ss ...string) Labels {
|
||||||
ls = append(ls, Label{Name: ss[i], Value: ss[i+1]})
|
ls = append(ls, Label{Name: ss[i], Value: ss[i+1]})
|
||||||
}
|
}
|
||||||
|
|
||||||
slices.SortFunc(ls, func(a, b Label) bool { return a.Name < b.Name })
|
|
||||||
return New(ls...)
|
return New(ls...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue