From a868fcbbbfe98e28b4952068ca3410b0fa7b22b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Mon, 9 Dec 2019 21:18:29 +0100 Subject: [PATCH] Fix compilation of `sp-authorship` (#4337) --- substrate/primitives/authorship/Cargo.toml | 11 ++++++----- substrate/primitives/authorship/src/lib.rs | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/substrate/primitives/authorship/Cargo.toml b/substrate/primitives/authorship/Cargo.toml index 4db66e6421..26093b0136 100644 --- a/substrate/primitives/authorship/Cargo.toml +++ b/substrate/primitives/authorship/Cargo.toml @@ -6,15 +6,16 @@ description = "Authorship primitives" edition = "2018" [dependencies] -sp-inherents = { package = "sp-inherents", path = "../inherents", default-features = false } -sr-primitives = { package = "sp-runtime", path = "../sr-primitives", default-features = false } +sp-inherents = { path = "../inherents", default-features = false } +sp-runtime = { path = "../runtime", default-features = false } rstd = { package = "sp-std", path = "../sr-std", default-features = false } codec = { package = "parity-scale-codec", version = "1.0.0", default-features = false, features = ["derive"] } [features] default = [ "std" ] std = [ - "codec/std", - "rstd/std", - "sp-inherents/std", + "codec/std", + "rstd/std", + "sp-inherents/std", + "sp-runtime/std", ] diff --git a/substrate/primitives/authorship/src/lib.rs b/substrate/primitives/authorship/src/lib.rs index b80102f41c..c143e752b2 100644 --- a/substrate/primitives/authorship/src/lib.rs +++ b/substrate/primitives/authorship/src/lib.rs @@ -22,13 +22,13 @@ use rstd::{result::Result, prelude::*}; use codec::{Encode, Decode}; use sp_inherents::{Error, InherentIdentifier, InherentData, IsFatalError}; -use sr_primitives::RuntimeString; +use sp_runtime::RuntimeString; /// The identifier for the `uncles` inherent. pub const INHERENT_IDENTIFIER: InherentIdentifier = *b"uncles00"; /// Errors that can occur while checking the authorship inherent. -#[derive(Encode, sr_primitives::RuntimeDebug)] +#[derive(Encode, sp_runtime::RuntimeDebug)] #[cfg_attr(feature = "std", derive(Decode))] pub enum InherentError { Uncles(RuntimeString), @@ -88,4 +88,4 @@ where F: Fn() -> Vec fn error_to_string(&self, _error: &[u8]) -> Option { Some(format!("no further information")) } -} \ No newline at end of file +}