Skip to content

Commit

Permalink
instead of requiring sp_std::vec::Vec import when using runtime API g…
Browse files Browse the repository at this point in the history
…eneration macro, let's use full type path directly in macro (#2551)
  • Loading branch information
svyatonik committed Sep 11, 2023
1 parent bf5b4cc commit 979acf3
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion primitives/chain-bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use frame_support::{
sp_runtime::{MultiAddress, MultiSigner},
};
use sp_runtime::RuntimeDebug;
use sp_std::prelude::Vec;

/// BridgeHubKusama parachain.
#[derive(RuntimeDebug)]
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::RuntimeDebug;
use sp_std::prelude::Vec;

/// BridgeHubPolkadot parachain.
#[derive(RuntimeDebug)]
Expand Down
2 changes: 1 addition & 1 deletion primitives/chain-bridge-hub-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug};
use sp_std::prelude::Vec;

/// BridgeHubRococo parachain.
#[derive(RuntimeDebug)]
pub struct BridgeHubRococo;
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-bridge-hub-wococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::RuntimeDebug;
use sp_std::prelude::Vec;

/// BridgeHubWococo parachain.
#[derive(RuntimeDebug)]
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain};
use frame_support::weights::Weight;
use sp_std::prelude::Vec;

/// Kusama Chain
pub struct Kusama;
Expand Down
4 changes: 1 addition & 3 deletions primitives/chain-polkadot-bulletin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@

use bp_header_chain::ChainWithGrandpa;
use bp_messages::MessageNonce;
use bp_runtime::{
decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain,
};
use bp_runtime::{decl_bridge_finality_runtime_apis, decl_bridge_messages_runtime_apis, Chain};
use frame_support::{
dispatch::DispatchClass,
parameter_types,
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, extensions::PrevalidateAttests, Chain};
use frame_support::weights::Weight;
use sp_std::prelude::Vec;

/// Polkadot Chain
pub struct Polkadot;
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-rialto-parachain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use sp_runtime::{
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiSignature, MultiSigner, Perbill,
};
use sp_std::vec::Vec;

/// Identifier of RialtoParachain in the Rialto relay chain.
///
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-rialto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use sp_runtime::{
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiSignature, MultiSigner, Perbill,
};
use sp_std::prelude::*;

/// Number of extra bytes (excluding size of storage value itself) of storage proof, built at
/// Rialto chain. This mostly depends on number of entries (and their density) in the storage trie.
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub use bp_polkadot_core::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain};
use frame_support::{parameter_types, weights::Weight};
use sp_std::prelude::Vec;

/// Rococo Chain
pub struct Rococo;
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ use frame_support::sp_std::prelude::*;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, Parachain};
use frame_support::weights::Weight;
use sp_std::prelude::Vec;

/// Westend Chain
pub struct Westend;
Expand Down
1 change: 0 additions & 1 deletion primitives/chain-wococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub use bp_rococo::{
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain};
use frame_support::weights::Weight;
use sp_std::prelude::Vec;

/// Wococo Chain
pub struct Wococo;
Expand Down
8 changes: 4 additions & 4 deletions primitives/runtime/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
$(
/// Returns the justifications accepted in the current block.
fn [<synced_headers_ $consensus:lower _info>](
) -> Vec<$justification_type>;
) -> sp_std::vec::Vec<$justification_type>;
)?
}
}
Expand Down Expand Up @@ -363,7 +363,7 @@ macro_rules! decl_bridge_messages_runtime_apis {
lane: bp_messages::LaneId,
begin: bp_messages::MessageNonce,
end: bp_messages::MessageNonce,
) -> Vec<bp_messages::OutboundMessageDetails>;
) -> sp_std::vec::Vec<bp_messages::OutboundMessageDetails>;
}

/// Inbound message lane API for messages sent by this chain.
Expand All @@ -377,8 +377,8 @@ macro_rules! decl_bridge_messages_runtime_apis {
/// Return details of given inbound messages.
fn message_details(
lane: bp_messages::LaneId,
messages: Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>,
) -> Vec<bp_messages::InboundMessageDetails>;
messages: sp_std::vec::Vec<(bp_messages::MessagePayload, bp_messages::OutboundMessageDetails)>,
) -> sp_std::vec::Vec<bp_messages::InboundMessageDetails>;
}
}
}
Expand Down

0 comments on commit 979acf3

Please sign in to comment.