mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
Wrap the subxt::events::Events type to avoid exposing subxt_core errors and types unnecessarily (#1948)
* Wrap the subxt::events::Events type to avoid exposing subxt_core errors and types unnecessarily (#1947) * Actually import module and fix issues * Remove a couple of unnecessary conversions now * Test
This commit is contained in:
+2
-2
@@ -75,7 +75,7 @@ pub trait StaticEvent: DecodeAsFields {
|
||||
/// A collection of events obtained from a block, bundled with the necessary
|
||||
/// information needed to decode and iterate over them.
|
||||
#[derive_where(Clone)]
|
||||
pub struct Events<T: Config> {
|
||||
pub struct Events<T> {
|
||||
metadata: Metadata,
|
||||
// Note; raw event bytes are prefixed with a Compact<u32> containing
|
||||
// the number of events to be decoded. The start_idx reflects that, so
|
||||
@@ -87,7 +87,7 @@ pub struct Events<T: Config> {
|
||||
}
|
||||
|
||||
// Ignore the Metadata when debug-logging events; it's big and distracting.
|
||||
impl<T: Config> core::fmt::Debug for Events<T> {
|
||||
impl<T> core::fmt::Debug for Events<T> {
|
||||
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||
f.debug_struct("Events")
|
||||
.field("event_bytes", &self.event_bytes)
|
||||
|
||||
Reference in New Issue
Block a user