Skip to content

Commit

Permalink
fix clippy: large-enum-variant
Browse files Browse the repository at this point in the history
  • Loading branch information
OverOrion committed Oct 24, 2022
1 parent 470c9cb commit c6758fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app-libs/stf/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{TrustedGetter, TrustedOperation};
use codec::{Decode, Encode};
use itp_types::H256;
use sp_core::blake2_256;
use std::vec::Vec;
use std::{boxed::Box, vec::Vec};

/// Trusted operation Or hash
///
Expand All @@ -33,12 +33,12 @@ pub enum TrustedOperationOrHash<Hash> {
/// Raw extrinsic bytes.
OperationEncoded(Vec<u8>),
/// Raw extrinsic
Operation(TrustedOperation),
Operation(Box<TrustedOperation>),
}

impl<Hash> TrustedOperationOrHash<Hash> {
pub fn from_top(top: TrustedOperation) -> Self {
TrustedOperationOrHash::Operation(top)
TrustedOperationOrHash::Operation(Box::new(top))
}
}

Expand Down

0 comments on commit c6758fe

Please sign in to comment.