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:
    ACK 84dd04cf60
  apoelstra:
    ACK 84dd04cf60
  Kixunil:
    ACK 84dd04cf60

Tree-SHA512: 1bfc875f53037b2c1e8da25fe44e9ca3303981bdce4e48661a8fb2061833e3cd90318d854f7119c805e861cd8a591697378f829f32eb74ac99a71dc4c947abde
This commit is contained in:
merge-script 2024-07-15 22:40:37 +00:00
commit 12f47c72c5
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 6 additions and 6 deletions

View File

@ -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]