Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Mar 17, 2023
1 parent 1b1ab02 commit 756cad2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codegen/src/api/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ fn generate_storage_entry_fns(
StorageEntryType::Map { key, .. } => {
let key_ty = type_gen.resolve_type(key.id());
match key_ty.type_def() {
// An N-map; return each of the keys separately.
TypeDef::Tuple(tuple) => {
let fields = tuple
.fields()
Expand All @@ -111,6 +112,7 @@ fn generate_storage_entry_fns(

(fields, key_impl)
}
// A map with a single key; return the single key.
_ => {
let ty_path = type_gen.resolve_type_path(key.id());
let fields = vec![(format_ident!("_0"), ty_path)];
Expand Down

0 comments on commit 756cad2

Please sign in to comment.