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

Fix clippy warnings #2861

Merged
merged 1 commit into from
Jan 5, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn process_message_fails_on_max_nonce_reached() {
channel_id,
command: mock_message(sibling_id).command,
};
let versioned_queued_message: VersionedQueuedMessage = message.try_into().unwrap();
let versioned_queued_message: VersionedQueuedMessage = message.into();
let encoded = versioned_queued_message.encode();
let mut meter = WeightMeter::with_limit(Weight::MAX);

Expand All @@ -134,7 +134,7 @@ fn process_message_fails_on_overweight_message() {
channel_id,
command: mock_message(sibling_id).command,
};
let versioned_queued_message: VersionedQueuedMessage = message.try_into().unwrap();
let versioned_queued_message: VersionedQueuedMessage = message.into();
let encoded = versioned_queued_message.encode();
let mut meter = WeightMeter::with_limit(Weight::from_parts(1, 1));
assert_noop!(
Expand Down
2 changes: 0 additions & 2 deletions bridges/snowbridge/parachain/pallets/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ use xcm_executor::traits::ConvertLocation;
#[cfg(feature = "runtime-benchmarks")]
use frame_support::traits::OriginTrait;

pub use pallet::*;

pub type BalanceOf<T> =
<<T as pallet::Config>::Token as Inspect<<T as frame_system::Config>::AccountId>>::Balance;
pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
Expand Down
8 changes: 4 additions & 4 deletions bridges/snowbridge/parachain/runtime/tests/src/test_cases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ use parachains_runtimes_test_utils::{
};
use sp_core::H160;
use sp_runtime::SaturatedConversion;
use xcm::latest::prelude::*;
use xcm::{
latest::prelude::*,
v3::Error::{self, Barrier},
};
use xcm_executor::XcmExecutor;
// Re-export test_case from `parachains-runtimes-test-utils`
pub use parachains_runtimes_test_utils::test_cases::change_storage_constant_by_governance_works;
use xcm::v3::Error::{self, Barrier};

type RuntimeHelper<Runtime, AllPalletsWithoutSystem = ()> =
parachains_runtimes_test_utils::RuntimeHelper<Runtime, AllPalletsWithoutSystem>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Identity {
};
let (github, discord) = additional
.as_ref()
.and_then(|vec| vec.get(0))
.and_then(|vec| vec.first())
.map(|(g, d)| (g.clone(), d.clone()))
.unwrap_or((Data::None, Data::None));
Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl Identity {
};
let (github, discord) = additional
.as_ref()
.and_then(|vec| vec.get(0))
.and_then(|vec| vec.first())
.map(|(g, d)| (g.clone(), d.clone()))
.unwrap_or((Data::None, Data::None));
Self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ pub mod xcm;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ pub mod xcm;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ pub mod xcm;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,4 @@ pub mod xcm;

pub use block_weights::constants::BlockExecutionWeight;
pub use extrinsic_weights::constants::ExtrinsicBaseWeight;
pub use paritydb_weights::constants::ParityDbWeight;
pub use rocksdb_weights::constants::RocksDbWeight;
1 change: 0 additions & 1 deletion polkadot/node/subsystem-bench/src/core/keyring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

pub use sp_core::sr25519;
use sp_core::{
sr25519::{Pair, Public},
Pair as PairT,
Expand Down
1 change: 0 additions & 1 deletion polkadot/node/subsystem-bench/src/core/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub mod network_bridge;
pub mod runtime_api;

pub use av_store::*;
pub use network_bridge::*;
pub use runtime_api::*;

pub struct AlwaysSupportsParachains {}
Expand Down
Loading