-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Replace last usages of <() as PalletInfo>
in substrate
#8080
Conversation
|
||
None | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: I didn't use construct_runtime here because runtime declare a very specific implementation of Call
which is not compatible with the code generated by construct_runtime
|
||
None | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I didn't use construct_runtime here because I don't think it is really needed for the test, and the easiest is a manual implementation.
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the duplicate, it looks good
frame/support/test/src/lib.rs
Outdated
pub struct PanicPalletInfo; | ||
|
||
impl frame_support::traits::PalletInfo for PanicPalletInfo{ | ||
fn index<P: 'static>() -> Option<usize> { | ||
unimplemented!("PanicPalletInfo mustn't be triggered by tests"); | ||
} | ||
fn name<P: 'static>() -> Option<&'static str> { | ||
unimplemented!("PanicPalletInfo mustn't be triggered by tests"); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use it from frame-support
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in frame-support I didn't expose it, it is hidden behind the #[cfg(test)]
flag, but we could make it public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh I had overseen this. Maybe move it at least from the traits
file then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I moved it to tests
module
bot merge |
Waiting for commit status. |
related #7949