Skip to content
Closed
Changes from all commits
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
13 changes: 1 addition & 12 deletions codegen/src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,7 @@ pub struct RuntimeGenerator {

impl RuntimeGenerator {
/// Create a new runtime generator from the provided metadata.
///
/// **Note:** If you have the metadata path, URL or bytes to hand, prefer to use
/// `GenerateRuntimeApi` for generating the runtime API from that.
///
/// # Panics
///
/// Panics if the runtime metadata version is not supported.
///
/// Supported versions: v14 and v15.
pub fn new(mut metadata: Metadata) -> Self {
scale_typegen::utils::ensure_unique_type_paths(metadata.types_mut())
.expect("Duplicate type paths in metadata; this is bug please file an issue.");
pub fn new(metadata: Metadata) -> Self {
RuntimeGenerator { metadata }
}

Expand Down
Loading