Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9d98d15
initial impl
shawntabrizi Jun 12, 2021
989d02b
expose in pallet_prelude
shawntabrizi Jun 12, 2021
a6321b1
temp test
shawntabrizi Jun 12, 2021
9ce58da
Apply suggestions from code review
gui1117 Jun 14, 2021
899eea4
implement with macro help.
gui1117 Jun 14, 2021
b5b74a1
Merge remote-tracking branch 'origin/master' into shawntabrizi-counte…
gui1117 Jun 15, 2021
43e635f
test for macro generation
gui1117 Jun 15, 2021
9885891
add iterable functions, some test and fixes
gui1117 Jun 15, 2021
2406021
Merge remote-tracking branch 'origin/master' into shawntabrizi-counte…
gui1117 Jun 16, 2021
4f31878
fix merge
gui1117 Jun 16, 2021
c588233
doc
gui1117 Jun 16, 2021
9c362a6
Update frame/support/src/storage/types/counted_map.rs
gui1117 Jul 5, 2021
ed44b79
Merge remote-tracking branch 'origin/master' into gui-shawntabrizi-co…
gui1117 Aug 6, 2021
cdb3fa3
fix merge
gui1117 Aug 6, 2021
f7417cf
fmt
gui1117 Aug 6, 2021
61208a4
fix spelling
gui1117 Aug 6, 2021
30da101
improve on removal
gui1117 Aug 6, 2021
c546c2e
fix partial storage info
gui1117 Aug 6, 2021
1e11c16
fmt
gui1117 Aug 6, 2021
497bc69
add license
gui1117 Aug 7, 2021
cc249fb
suggested renames
gui1117 Aug 7, 2021
4d6de59
fix typo
gui1117 Aug 7, 2021
3313f73
Merge remote-tracking branch 'origin/master' into gui-shawntabrizi-co…
gui1117 Sep 15, 2021
a4c7f3f
fix test
gui1117 Sep 15, 2021
4841dbb
fmt
gui1117 Sep 15, 2021
b3d2111
fix ui tests
gui1117 Sep 16, 2021
4b62aab
clearer doc
gui1117 Sep 16, 2021
448937d
better doc
gui1117 Sep 16, 2021
cc13432
add metadata test
gui1117 Sep 16, 2021
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
fix typo
  • Loading branch information
gui1117 committed Aug 7, 2021
commit 4d6de597993c2381619a93435304b57e90c1e814
6 changes: 3 additions & 3 deletions frame/support/procedural/src/pallet/expand/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ fn counter_prefix(prefix: &str) -> String {
fn check_prefix_duplicates(
storage_def: &StorageDef,
// A hashmap of all already used prefix and their associated error if duplication
used_prefix: &mut HashMap<String, syn::Error>,
used_prefixes: &mut HashMap<String, syn::Error>,
) -> syn::Result<()> {
let prefix = storage_def.prefix();
let dup_err = syn::Error::new(
storage_def.prefix_span(),
format!("Duplicate storage prefixes found for `{}`", prefix),
);

if let Some(other_dup_err) = used_prefix.insert(prefix.clone(), dup_err.clone()) {
if let Some(other_dup_err) = used_prefixes.insert(prefix.clone(), dup_err.clone()) {
let mut err = dup_err;
err.combine(other_dup_err);
return Err(err)
Expand All @@ -76,7 +76,7 @@ fn check_prefix_duplicates(
);

if let Some(other_dup_err) =
used_prefix.insert(counter_prefix.clone(), counter_dup_err.clone())
used_prefixes.insert(counter_prefix.clone(), counter_dup_err.clone())
{
let mut err = counter_dup_err;
err.combine(other_dup_err);
Expand Down