Skip to content

Commit 4ab7e7a

Browse files
committed
Use terse struct construction form
Clippy emits: warning: redundant field names in struct initialization As suggested remove the redundant field names and use the more terse form of struct construction (I forget the correct technical term).
1 parent 9d1a984 commit 4ab7e7a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/interpreter/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ mod tests {
11431143
) -> Iter<'elem, 'txin> {
11441144
Iter {
11451145
verify_sig: verify_fn,
1146-
stack: stack,
1146+
stack,
11471147
public_key: None,
11481148
state: vec![NodeEvaluationState {
11491149
node: &ms,
@@ -1241,7 +1241,7 @@ mod tests {
12411241
sah256_satisfied.unwrap(),
12421242
vec![SatisfiedConstraint::HashLock {
12431243
hash: HashLockType::Sha256(sha256_hash),
1244-
preimage: preimage,
1244+
preimage,
12451245
}]
12461246
);
12471247

@@ -1254,7 +1254,7 @@ mod tests {
12541254
sha256d_satisfied.unwrap(),
12551255
vec![SatisfiedConstraint::HashLock {
12561256
hash: HashLockType::Hash256(hash256_hash),
1257-
preimage: preimage,
1257+
preimage,
12581258
}]
12591259
);
12601260

@@ -1267,7 +1267,7 @@ mod tests {
12671267
hash160_satisfied.unwrap(),
12681268
vec![SatisfiedConstraint::HashLock {
12691269
hash: HashLockType::Hash160(hash160_hash),
1270-
preimage: preimage,
1270+
preimage,
12711271
}]
12721272
);
12731273

@@ -1280,7 +1280,7 @@ mod tests {
12801280
ripemd160_satisfied.unwrap(),
12811281
vec![SatisfiedConstraint::HashLock {
12821282
hash: HashLockType::Ripemd160(ripemd160_hash),
1283-
preimage: preimage
1283+
preimage,
12841284
}]
12851285
);
12861286

@@ -1330,7 +1330,7 @@ mod tests {
13301330
},
13311331
SatisfiedConstraint::HashLock {
13321332
hash: HashLockType::Sha256(sha256_hash),
1333-
preimage: preimage,
1333+
preimage,
13341334
}
13351335
]
13361336
);
@@ -1356,7 +1356,7 @@ mod tests {
13561356
},
13571357
SatisfiedConstraint::HashLock {
13581358
hash: HashLockType::Sha256(sha256_hash),
1359-
preimage: preimage,
1359+
preimage,
13601360
}
13611361
]
13621362
);
@@ -1397,7 +1397,7 @@ mod tests {
13971397
or_b_satisfied.unwrap(),
13981398
vec![SatisfiedConstraint::HashLock {
13991399
hash: HashLockType::Sha256(sha256_hash),
1400-
preimage: preimage,
1400+
preimage,
14011401
}]
14021402
);
14031403

0 commit comments

Comments
 (0)