lib/storage: remove extra error check (#3396)

This commit is contained in:
匠心零度 2022-11-29 00:07:11 +08:00 committed by GitHub
parent 92a7f71ee1
commit d4808d5b84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -964,9 +964,6 @@ func testStorageRegisterMetricNames(s *Storage) error {
if err != nil {
return fmt.Errorf("error in SearchMetricNames: %w", err)
}
if err != nil {
return fmt.Errorf("cannot unmarshal metric names: %w", err)
}
if len(metricNames) < metricsPerAdd {
return fmt.Errorf("unexpected number of metricNames returned from SearchMetricNames; got %d; want at least %d", len(metricNames), int(metricsPerAdd))
}