Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixes compile error and warning
  • Loading branch information
bkchr committed Sep 10, 2018
commit 8bf5ba25f033e3b4ec5f2cfd1e4fad2d03b0cf38
4 changes: 3 additions & 1 deletion substrate/runtime-support/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

use codec::{Encode, Decode, Output, Input};
use codec::{Encode, Output};
#[cfg(feature = "std")]
use codec::{Decode, Input};
use alloc;

/// Make Box available on `std` and `no_std`.
Expand Down
8 changes: 5 additions & 3 deletions substrate/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ pub mod api {
use system;
impl_stubs!(
version => |()| super::version(),
json_metadata => |()| vec![
::runtime_support::metadata::JSONMetadata::Events { events: r#""events""# }
],
json_metadata => |()| {
let mut vec = ::runtime_support::metadata::Vec::new();
vec.push(::runtime_support::metadata::JSONMetadata::Events { events: r#""events""# });
vec
},
authorities => |()| system::authorities(),
initialise_block => |header| system::initialise_block(header),
execute_block => |block| system::execute_block(block),
Expand Down