Skip to content

Commit ccba7cf

Browse files
committed
Added formatting
1 parent 9e64448 commit ccba7cf

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

src/connection/base_connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{connection::Buffer, utils::Error, juno_module_impl::JunoModuleImpl};
1+
use crate::{connection::Buffer, juno_module_impl::JunoModuleImpl, utils::Error};
22
use async_trait::async_trait;
33
use std::sync::Arc;
44

@@ -7,7 +7,7 @@ pub trait BaseConnection {
77
async fn setup_connection(&mut self) -> Result<(), Error>;
88
async fn close_connection(&mut self) -> Result<(), Error>;
99
async fn send(&mut self, buffer: Buffer) -> Result<(), Error>;
10-
10+
1111
fn set_data_listener(&mut self, listener: Arc<JunoModuleImpl>);
1212
fn get_data_listener(&self) -> &Option<Arc<JunoModuleImpl>>;
1313
}

src/connection/inet_socket_connection.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ use std::sync::Arc;
77

88
use async_std::{io::BufReader, net::TcpStream, prelude::*, task};
99
use async_trait::async_trait;
10-
use future::Either;
1110
use futures::{
1211
channel::{
1312
mpsc::{unbounded, UnboundedReceiver, UnboundedSender},
1413
oneshot::{channel, Sender},
1514
},
16-
future, SinkExt,
15+
future::{self, Either}, SinkExt,
1716
};
1817

1918
pub struct InetSocketConnection {
@@ -97,13 +96,13 @@ impl BaseConnection for InetSocketConnection {
9796
}
9897

9998
async fn read_data_from_socket(
100-
socket_path: String,
99+
connect_addr: String,
101100
init_sender: Sender<Result<(), Error>>,
102101
juno_impl: Arc<JunoModuleImpl>,
103102
mut write_receiver: UnboundedReceiver<Vec<u8>>,
104103
mut close_receiver: UnboundedReceiver<()>,
105104
) {
106-
let result = TcpStream::connect(socket_path).await;
105+
let result = TcpStream::connect(connect_addr).await;
107106
if let Err(err) = result {
108107
init_sender
109108
.send(Err(Error::Internal(format!("{}", err))))

src/connection/unix_socket_connection.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ use std::sync::Arc;
77

88
use async_std::{io::BufReader, os::unix::net::UnixStream, prelude::*, task};
99
use async_trait::async_trait;
10-
use future::Either;
1110
use futures::{
1211
channel::{
1312
mpsc::{unbounded, UnboundedReceiver, UnboundedSender},
1413
oneshot::{channel, Sender},
1514
},
16-
future, SinkExt,
15+
future::{self, Either}, SinkExt,
1716
};
1817

1918
pub struct UnixSocketConnection {

0 commit comments

Comments
 (0)