Skip to content

Commit

Permalink
refactor: Replace loop by unpacking S1011
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Dec 26, 2023
1 parent 22b37c6 commit 887e31a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/emissions/rte.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ func makeRTEAPIRequest(ctx context.Context, logger log.Logger) (float64, error)
}

var fields []nationalRealTimeFieldsV2
for _, r := range data.Results {
fields = append(fields, r)
}
fields = append(fields, data.Results...)
return float64(fields[0].TauxCo2), nil
}

0 comments on commit 887e31a

Please sign in to comment.