Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not require sp_std::vec::Vec import when using runtime API generation macro #2551

Merged
merged 1 commit into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -30,7 +30,6 @@ use frame_support::{
sp_runtime::{MultiAddress, MultiSigner},
};
use sp_runtime::{RuntimeDebug, StateVersion};
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 @@ -27,7 +27,6 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::{RuntimeDebug, StateVersion};
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 @@ -27,7 +27,7 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::{MultiAddress, MultiSigner, RuntimeDebug, StateVersion};
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 @@ -27,7 +27,6 @@ use bp_runtime::{
};
use frame_support::dispatch::DispatchClass;
use sp_runtime::{RuntimeDebug, StateVersion};
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 @@ -25,7 +25,6 @@ use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
use frame_support::weights::Weight;
use sp_runtime::StateVersion;
use sp_std::prelude::Vec;

/// Kusama Chain
pub struct Kusama;
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 @@ -27,7 +27,6 @@ use bp_runtime::{
};
use frame_support::weights::Weight;
use sp_runtime::StateVersion;
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, RuntimeDebug, StateVersion,
};
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, RuntimeDebug, StateVersion,
};
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 @@ -25,7 +25,6 @@ use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
use frame_support::weights::Weight;
use sp_runtime::StateVersion;
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 @@ -25,7 +25,6 @@ use sp_runtime::StateVersion;
use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId, Parachain};
use frame_support::weights::Weight;
use sp_std::prelude::*;

/// 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 @@ -28,7 +28,6 @@ use bp_header_chain::ChainWithGrandpa;
use bp_runtime::{decl_bridge_finality_runtime_apis, Chain, ChainId};
use frame_support::weights::Weight;
use sp_runtime::StateVersion;
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 @@ -322,7 +322,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 @@ -374,7 +374,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 @@ -388,8 +388,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