mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
cargo +nightly fmt (#3540)
* cargo +nightly fmt * add cargo-fmt check to ci * update ci * fmt * fmt * skip macro * ignore bridges
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
//! A dummy to be used with cargo expand
|
||||
|
||||
use polkadot_overseer_gen::*;
|
||||
use polkadot_node_network_protocol::WrongVariant;
|
||||
|
||||
use polkadot_overseer_gen::*;
|
||||
|
||||
/// Concrete subsystem implementation for `MsgStrukt` msg type.
|
||||
#[derive(Default)]
|
||||
pub struct AwesomeSubSys;
|
||||
|
||||
impl ::polkadot_overseer_gen::Subsystem<XxxSubsystemContext<MsgStrukt>, Yikes> for AwesomeSubSys {
|
||||
fn start(self, _ctx: XxxSubsystemContext<MsgStrukt>) -> SpawnedSubsystem < Yikes > {
|
||||
impl ::polkadot_overseer_gen::Subsystem<XxxSubsystemContext<MsgStrukt>, Yikes> for AwesomeSubSys {
|
||||
fn start(self, _ctx: XxxSubsystemContext<MsgStrukt>) -> SpawnedSubsystem<Yikes> {
|
||||
unimplemented!("starting yay!")
|
||||
}
|
||||
}
|
||||
@@ -18,22 +17,19 @@ impl ::polkadot_overseer_gen::Subsystem<XxxSubsystemContext<MsgStrukt>, Yikes> f
|
||||
pub struct GoblinTower;
|
||||
|
||||
impl ::polkadot_overseer_gen::Subsystem<XxxSubsystemContext<Plinko>, Yikes> for GoblinTower {
|
||||
fn start(self, _ctx: XxxSubsystemContext<Plinko>) -> SpawnedSubsystem < Yikes > {
|
||||
fn start(self, _ctx: XxxSubsystemContext<Plinko>) -> SpawnedSubsystem<Yikes> {
|
||||
unimplemented!("welcum")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// A signal sent by the overseer.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SigSigSig;
|
||||
|
||||
|
||||
/// The external event.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EvX;
|
||||
|
||||
|
||||
impl EvX {
|
||||
pub fn focus<'a, T>(&'a self) -> Result<EvX, ()> {
|
||||
unimplemented!("dispatch")
|
||||
@@ -75,7 +71,6 @@ impl From<NetworkMsg> for MsgStrukt {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum NetworkMsg {
|
||||
A,
|
||||
@@ -83,18 +78,15 @@ pub enum NetworkMsg {
|
||||
C,
|
||||
}
|
||||
|
||||
|
||||
impl NetworkMsg {
|
||||
fn focus(&self) -> Result<Self, WrongVariant> {
|
||||
Ok(match self {
|
||||
Self::B => return Err(WrongVariant),
|
||||
Self::A | Self::C => self.clone()
|
||||
Self::A | Self::C => self.clone(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[overlord(signal=SigSigSig, event=EvX, error=Yikes, network=NetworkMsg, gen=AllMessages)]
|
||||
struct Xxx {
|
||||
#[subsystem(MsgStrukt)]
|
||||
@@ -109,7 +101,7 @@ struct Xxx {
|
||||
#[derive(Debug, Clone)]
|
||||
struct DummySpawner;
|
||||
|
||||
impl SpawnNamed for DummySpawner{
|
||||
impl SpawnNamed for DummySpawner {
|
||||
fn spawn_blocking(&self, name: &'static str, _future: futures::future::BoxFuture<'static, ()>) {
|
||||
unimplemented!("spawn blocking {}", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user