Skip to content

Commit

Permalink
fix nit
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Sep 25, 2024
1 parent c00d092 commit d3046ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/consensus/src/receipt/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ impl<T> Receipts<T> {
}

/// Push a new vector of receipts into the [`Receipts`] collection.
pub fn push(&mut self, receipts: Vec<Receipt<T>>) {
pub fn push(&mut self, receipts: Vec<T>) {
self.receipt_vec.push(receipts);
}
}

impl<T> From<Vec<Receipt<T>>> for Receipts<T> {
fn from(block_receipts: Vec<Receipt<T>>) -> Self {
impl<T> From<Vec<T>> for Receipts<T> {
fn from(block_receipts: Vec<T>) -> Self {
Self { receipt_vec: vec![block_receipts] }
}
}

impl<T> FromIterator<Vec<Receipt<T>>> for Receipts<T> {
fn from_iter<I: IntoIterator<Item = Vec<Receipt<T>>>>(iter: I) -> Self {
impl<T> FromIterator<Vec<T>> for Receipts<T> {
fn from_iter<I: IntoIterator<Item = Vec<T>>>(iter: I) -> Self {
Self { receipt_vec: iter.into_iter().collect() }
}
}
Expand Down

0 comments on commit d3046ab

Please sign in to comment.