Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
NunoAlexandre committed Oct 31, 2023
1 parent 167e22c commit 008dd24
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions libs/mocks/src/liquidity_pools_gateway_routers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pub mod pallet {
}

impl<T: Config> MockedRouter for Pallet<T> {
type Sender = T::AccountId;
type Message = MessageMock;
type Sender = T::AccountId;

fn init() -> DispatchResult {
execute_call!(())
Expand Down Expand Up @@ -73,8 +73,8 @@ impl<T: pallet::Config> RouterMock<T> {
}
}

/// Here we implement the actual Router trait for the `RouterMock` which in turn calls
/// the `MockedRouter` trait implementation.
/// Here we implement the actual Router trait for the `RouterMock` which in turn
/// calls the `MockedRouter` trait implementation.
impl<T: pallet::Config> Router for RouterMock<T> {
type Message = MessageMock;
type Sender = T::AccountId;
Expand All @@ -90,9 +90,10 @@ impl<T: pallet::Config> Router for RouterMock<T> {

/// A mocked Router trait that emulates the actual Router trait but without
/// the inclusion of &self in the function parameters. This allows us to have
/// the mocked Routers pallet (defined above) implementing a Router-like trait (and not
/// just like regular pallet functions) when defining the mocked calls, which is implicitly
/// required by mock-builder or else it fails with `Location must have trait info"`.
/// the mocked Routers pallet (defined above) implementing a Router-like trait
/// (and not just like regular pallet functions) when defining the mocked calls,
/// which is implicitly required by mock-builder or else it fails with `Location
/// must have trait info"`.
trait MockedRouter {
/// The sender type of the outbound message.
type Sender;
Expand All @@ -105,4 +106,4 @@ trait MockedRouter {

/// Send the message to the router's destination.
fn send(sender: Self::Sender, message: Self::Message) -> DispatchResult;
}
}

0 comments on commit 008dd24

Please sign in to comment.