Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Zoe Faltibà <[email protected]>
  • Loading branch information
dr-orlovsky and zoedberg authored Oct 5, 2023
1 parent d962c2a commit c667d5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions primitives/src/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl Outpoint {
}

#[inline]
pub const fn coinbse() -> Self {
pub const fn coinbase() -> Self {
Self {
txid: Txid::coinbase(),
vout: Vout::from_u32(0),
Expand Down Expand Up @@ -802,7 +802,7 @@ mod test {
"80b7d8a82d5d5bf92905b06f2014dd699e03837ca172e3a59d51426ebbe3e7f5".to_string()
);

/* TODO: Enable once weight calculation is threr
/* TODO: Enable once weight calculation is there
const EXPECTED_WEIGHT: Weight = Weight::from_wu(442);
assert_eq!(realtx.weight(), EXPECTED_WEIGHT);
assert_eq!(realtx.total_size(), tx_bytes.len());
Expand Down
2 changes: 1 addition & 1 deletion primitives/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Chain {
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct VarInt(pub u64);

#[allow(clippy::len_without_is_empty)] // VarInt has on concept of 'is_empty'.
#[allow(clippy::len_without_is_empty)] // VarInt has no concept of 'is_empty'.
impl VarInt {
pub const fn new(u: u64) -> Self { VarInt(u) }

Expand Down
2 changes: 1 addition & 1 deletion primitives/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Weight for TxIn {

impl Weight for TxOut {
fn weight_units(&self) -> WeightUnits {
WeightUnits::no_discount(8) //value
WeightUnits::no_discount(8) // value
+ self.script_pubkey.weight_units()
}
}
Expand Down

0 comments on commit c667d5c

Please sign in to comment.