mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
sp-api: Remove requirement on Get*BlockType (#14299)
Remove the requirement on `GetNodeBlockType` and `GetRuntimeBlockType`. Actually this wasn't already used anymore and only referenced in tests.
This commit is contained in:
@@ -88,32 +88,6 @@ fn remove_supported_attributes(attrs: &mut Vec<Attribute>) -> HashMap<&'static s
|
||||
result
|
||||
}
|
||||
|
||||
/// Visits the ast and checks if `Block` ident is used somewhere.
|
||||
struct IsUsingBlock {
|
||||
result: bool,
|
||||
}
|
||||
|
||||
impl<'ast> Visit<'ast> for IsUsingBlock {
|
||||
fn visit_ident(&mut self, i: &'ast Ident) {
|
||||
if i == BLOCK_GENERIC_IDENT {
|
||||
self.result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Replace all occurrences of `Block` with `NodeBlock`
|
||||
struct ReplaceBlockWithNodeBlock {}
|
||||
|
||||
impl Fold for ReplaceBlockWithNodeBlock {
|
||||
fn fold_ident(&mut self, input: Ident) -> Ident {
|
||||
if input == BLOCK_GENERIC_IDENT {
|
||||
Ident::new("NodeBlock", Span::call_site())
|
||||
} else {
|
||||
input
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Versioned API traits are used to catch missing methods when implementing a specific version of a
|
||||
/// versioned API. They contain all non-versioned methods (aka stable methods) from the main trait
|
||||
/// and all versioned methods for the specific version. This means that there is one trait for each
|
||||
|
||||
Reference in New Issue
Block a user