Skip to content

Commit

Permalink
fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
librelois committed Jul 31, 2023
1 parent 379fcd7 commit 51e3068
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pallets/maintenance-mode/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl<T: frame_system::Config> frame_support::traits::TryState<BlockNumberOf<T>>
fn try_state(
_: BlockNumberOf<T>,
_: frame_support::traits::TryStateSelect,
) -> Result<(), &'static str> {
) -> Result<(), sp_runtime::DispatchError> {
Ok(())
}
}
4 changes: 2 additions & 2 deletions pallets/randomness/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ benchmarks! {
}
verify {
// verify VrfOutput was inserted into storage as expected
let pubkey = sp_consensus_vrf::schnorrkel::PublicKey::from_bytes(vrf_id.as_slice())
let pubkey = sp_consensus_babe::schnorrkel::PublicKey::from_bytes(vrf_id.as_slice())
.expect("Expect VrfId is valid schnorrkel Public key");
let vrf_output: sp_consensus_vrf::schnorrkel::Randomness = vrf_pre_digest.vrf_output
let vrf_output: sp_consensus_babe::schnorrkel::Randomness = vrf_pre_digest.vrf_output
.attach_input_hash(&pubkey, transcript)
.ok()
.map(|inout| inout.make_bytes(&session_keys_primitives::VRF_INOUT_CONTEXT))
Expand Down
4 changes: 2 additions & 2 deletions primitives/nimbus-primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use sp_runtime::generic::DigestItem;
use sp_runtime::traits::BlockNumberProvider;
use sp_runtime::ConsensusEngineId;
#[cfg(feature = "runtime-benchmarks")]
use sp_std::vec::{self, Vec};
use sp_std::vec::Vec;

pub mod digests;
mod inherents;
Expand Down Expand Up @@ -114,7 +114,7 @@ impl SlotBeacon for IntervalBeacon {
pub trait CanAuthor<AuthorId> {
#[cfg(feature = "try-runtime")]
// With `try-runtime` the local author should always be able to author a block.
fn can_author(author: &AuthorId, slot: &u32) -> bool {
fn can_author(_author: &AuthorId, _slot: &u32) -> bool {
true
}
#[cfg(not(feature = "try-runtime"))]
Expand Down

0 comments on commit 51e3068

Please sign in to comment.