Skip to content
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
Fmt
  • Loading branch information
ascjones committed Jan 28, 2021
commit 017d260d57f23f1e14b13c9c495e31818edbf04d
10 changes: 7 additions & 3 deletions crates/metadata/src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ use ink_prelude::collections::btree_map::BTreeMap;
use ink_primitives::Key;
use scale_info::{
form::{
PortableForm,
Form,
MetaForm,
PortableForm,
},
meta_type,
IntoPortable,
Expand Down Expand Up @@ -165,14 +165,18 @@ impl IntoPortable for Layout {
Layout::Cell(encoded_cell) => {
Layout::Cell(encoded_cell.into_portable(registry))
}
Layout::Hash(hash_layout) => Layout::Hash(hash_layout.into_portable(registry)),
Layout::Hash(hash_layout) => {
Layout::Hash(hash_layout.into_portable(registry))
}
Layout::Array(array_layout) => {
Layout::Array(array_layout.into_portable(registry))
}
Layout::Struct(struct_layout) => {
Layout::Struct(struct_layout.into_portable(registry))
}
Layout::Enum(enum_layout) => Layout::Enum(enum_layout.into_portable(registry)),
Layout::Enum(enum_layout) => {
Layout::Enum(enum_layout.into_portable(registry))
}
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ use impl_serde::serialize as serde_hex;
#[cfg(feature = "derive")]
use scale_info::{
form::{
FormString,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is a FormString bringing to the table?

PortableForm,
FormString
},
IntoPortable as _,
Registry,
PortableRegistry,
Registry,
};
use serde::{
de::DeserializeOwned,
Expand Down Expand Up @@ -91,7 +91,7 @@ impl InkProject {

impl<S> InkProject<S>
where
S: FormString
S: FormString,
{
/// Returns a read-only registry of types in the contract.
pub fn registry(&self) -> &PortableRegistry<S> {
Expand Down
2 changes: 1 addition & 1 deletion crates/metadata/src/specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use alloc::{
use core::marker::PhantomData;
use scale_info::{
form::{
PortableForm,
Form,
MetaForm,
PortableForm,
},
meta_type,
IntoPortable,
Expand Down