Merge rust-bitcoin/rust-bitcoin#3030: Rename variable assignment
84dd04cf60
Rename variable assignment (yancy) Pull request description: The type created after assignment is a Weight type. Using a var name vb which is short for virtual byte is incorrect. Pulled this out of stale PR 2215 ACKs for top commit: shinghim: ACK84dd04cf60
apoelstra: ACK84dd04cf60
Kixunil: ACK84dd04cf60
Tree-SHA512: 1bfc875f53037b2c1e8da25fe44e9ca3303981bdce4e48661a8fb2061833e3cd90318d854f7119c805e861cd8a591697378f829f32eb74ac99a71dc4c947abde
This commit is contained in:
commit
12f47c72c5
|
@ -234,11 +234,11 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn from_vb() {
|
||||
let vb = Weight::from_vb(1).expect("expected weight unit");
|
||||
assert_eq!(Weight(4), vb);
|
||||
let w = Weight::from_vb(1).expect("expected weight unit");
|
||||
assert_eq!(Weight(4), w);
|
||||
|
||||
let vb = Weight::from_vb(u64::MAX);
|
||||
assert_eq!(None, vb);
|
||||
let w = Weight::from_vb(u64::MAX);
|
||||
assert_eq!(None, w);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -249,8 +249,8 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn from_vb_unchecked() {
|
||||
let vb = Weight::from_vb_unchecked(1);
|
||||
assert_eq!(Weight(4), vb);
|
||||
let w = Weight::from_vb_unchecked(1);
|
||||
assert_eq!(Weight(4), w);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in New Issue