Skip to content

Commit

Permalink
RuntimeString -> Cow
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Jan 17, 2025
1 parent 7f9dc8f commit bb54ada
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions container-chain-pallets/authorities-noting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ use {
frame_system::pallet_prelude::*,
parity_scale_codec::{Decode, Encode},
sp_inherents::{InherentIdentifier, IsFatalError},
sp_runtime::{traits::Hash as HashT, RuntimeString},
sp_runtime::{traits::Hash as HashT},
sp_std::prelude::*,
sp_std::borrow::Cow,
};

pub trait GetContainerChains {
Expand Down Expand Up @@ -279,7 +280,7 @@ pub mod pallet {
fn is_inherent_required(_: &InherentData) -> Result<Option<Self::Error>, Self::Error> {
// Return Ok(Some(_)) unconditionally because this inherent is required in every block
Ok(Some(InherentError::Other(
String::from(
Cow::from(
"Orchestrator Authorities Noting Inherent required",
),
)))
Expand Down Expand Up @@ -382,7 +383,7 @@ impl<T: Config> Pallet<T> {
#[derive(Encode)]
#[cfg_attr(feature = "std", derive(Debug, Decode))]
pub enum InherentError {
Other(RuntimeString),
Other(Cow<'static, str>),
}

impl IsFatalError for InherentError {
Expand Down

0 comments on commit bb54ada

Please sign in to comment.