Skip to content

Commit 1b1df04

Browse files
authored
fix: remove copy loop var as it's no longer necessary (#910)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 67521c4 commit 1b1df04

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

ledger/alonzo/alonzo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ func (b *AlonzoTransactionBody) UnmarshalCBOR(cborData []byte) error {
169169
func (b *AlonzoTransactionBody) Outputs() []common.TransactionOutput {
170170
ret := []common.TransactionOutput{}
171171
for _, output := range b.TxOutputs {
172-
output := output
172+
173173
ret = append(ret, &output)
174174
}
175175
return ret

ledger/babbage/babbage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func (b *BabbageTransactionBody) UnmarshalCBOR(cborData []byte) error {
227227
func (b *BabbageTransactionBody) Outputs() []common.TransactionOutput {
228228
ret := []common.TransactionOutput{}
229229
for _, output := range b.TxOutputs {
230-
output := output
230+
231231
ret = append(ret, &output)
232232
}
233233
return ret
@@ -244,7 +244,7 @@ func (b *BabbageTransactionBody) ProtocolParameterUpdates() (uint64, map[common.
244244
func (b *BabbageTransactionBody) ReferenceInputs() []common.TransactionInput {
245245
ret := []common.TransactionInput{}
246246
for _, input := range b.TxReferenceInputs {
247-
input := input
247+
248248
ret = append(ret, &input)
249249
}
250250
return ret

ledger/byron/byron.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func (t *ByronTransaction) Inputs() []common.TransactionInput {
170170
func (t *ByronTransaction) Outputs() []common.TransactionOutput {
171171
ret := []common.TransactionOutput{}
172172
for _, output := range t.TxOutputs {
173-
output := output
173+
174174
ret = append(ret, &output)
175175
}
176176
return ret
@@ -617,7 +617,7 @@ func (b *ByronMainBlock) Era() common.Era {
617617
func (b *ByronMainBlock) Transactions() []common.Transaction {
618618
ret := make([]common.Transaction, len(b.Body.TxPayload))
619619
for idx, payload := range b.Body.TxPayload {
620-
payload := payload
620+
621621
ret[idx] = &payload.Transaction
622622
}
623623
return ret

ledger/mary/mary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (b *MaryTransactionBody) UnmarshalCBOR(cborData []byte) error {
159159
func (b *MaryTransactionBody) Outputs() []common.TransactionOutput {
160160
ret := []common.TransactionOutput{}
161161
for _, output := range b.TxOutputs {
162-
output := output
162+
163163
ret = append(ret, &output)
164164
}
165165
return ret

ledger/shelley/shelley.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ func (b *ShelleyTransactionBody) Inputs() []common.TransactionInput {
232232
func (b *ShelleyTransactionBody) Outputs() []common.TransactionOutput {
233233
ret := []common.TransactionOutput{}
234234
for _, output := range b.TxOutputs {
235-
output := output
235+
236236
ret = append(ret, &output)
237237
}
238238
return ret

0 commit comments

Comments
 (0)