Skip to content

Commit

Permalink
Apply latest cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmarkov committed Sep 23, 2024
1 parent bba821c commit d4d86fc
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 12 deletions.
10 changes: 8 additions & 2 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ impl<R> Receiver for &mut R
where
R: Receiver,
{
type Data<'a> = R::Data<'a> where Self: 'a;
type Data<'a>
= R::Data<'a>
where
Self: 'a;

fn recv(&mut self) -> Result<Self::Data<'_>, Self::Error> {
(**self).recv()
Expand Down Expand Up @@ -86,7 +89,10 @@ pub mod asynch {
where
R: Receiver,
{
type Data<'a> = R::Data<'a> where Self: 'a;
type Data<'a>
= R::Data<'a>
where
Self: 'a;

async fn recv(&mut self) -> Result<Self::Data<'_>, Self::Error> {
(**self).recv().await
Expand Down
10 changes: 8 additions & 2 deletions src/mqtt/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,10 @@ impl<C> Connection for &mut C
where
C: Connection,
{
type Event<'a> = C::Event<'a> where Self: 'a;
type Event<'a>
= C::Event<'a>
where
Self: 'a;

fn next(&mut self) -> Result<Self::Event<'_>, Self::Error> {
(*self).next()
Expand Down Expand Up @@ -277,7 +280,10 @@ pub mod asynch {
where
C: Connection,
{
type Event<'a> = C::Event<'a> where Self: 'a;
type Event<'a>
= C::Event<'a>
where
Self: 'a;

async fn next(&mut self) -> Result<Self::Event<'_>, Self::Error> {
(*self).next().await
Expand Down
10 changes: 8 additions & 2 deletions src/ota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ impl<O> Ota for &mut O
where
O: Ota,
{
type Update<'a> = O::Update<'a> where Self: 'a;
type Update<'a>
= O::Update<'a>
where
Self: 'a;

fn get_boot_slot(&self) -> Result<Slot, Self::Error> {
(**self).get_boot_slot()
Expand Down Expand Up @@ -207,7 +210,10 @@ pub mod asynch {
where
O: Ota,
{
type Update<'a> = O::Update<'a> where Self: 'a;
type Update<'a>
= O::Update<'a>
where
Self: 'a;

async fn get_boot_slot(&self) -> Result<Slot, Self::Error> {
(**self).get_boot_slot().await
Expand Down
30 changes: 24 additions & 6 deletions src/ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ pub mod server {
where
A: Acceptor,
{
type Connection<'a> = A::Connection<'a> where Self: 'a;
type Connection<'a>
= A::Connection<'a>
where
Self: 'a;

fn accept(&self) -> Result<Self::Connection<'_>, Self::Error> {
(*self).accept()
Expand All @@ -103,7 +106,10 @@ pub mod server {
where
A: Acceptor,
{
type Connection<'a> = A::Connection<'a> where Self: 'a;
type Connection<'a>
= A::Connection<'a>
where
Self: 'a;

fn accept(&self) -> Result<Self::Connection<'_>, Self::Error> {
(**self).accept()
Expand Down Expand Up @@ -172,8 +178,14 @@ pub mod asynch {
where
A: Acceptor,
{
type Sender<'a> = A::Sender<'a> where Self: 'a;
type Receiver<'a> = A::Receiver<'a> where Self: 'a;
type Sender<'a>
= A::Sender<'a>
where
Self: 'a;
type Receiver<'a>
= A::Receiver<'a>
where
Self: 'a;

async fn accept(&self) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error> {
(*self).accept().await
Expand All @@ -184,8 +196,14 @@ pub mod asynch {
where
A: Acceptor,
{
type Sender<'a> = A::Sender<'a> where Self: 'a;
type Receiver<'a> = A::Receiver<'a> where Self: 'a;
type Sender<'a>
= A::Sender<'a>
where
Self: 'a;
type Receiver<'a>
= A::Receiver<'a>
where
Self: 'a;

async fn accept(&self) -> Result<(Self::Sender<'_>, Self::Receiver<'_>), Self::Error> {
(**self).accept().await
Expand Down

0 comments on commit d4d86fc

Please sign in to comment.