Skip to content

Commit

Permalink
Perform cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
chinsyo committed Oct 9, 2024
1 parent 75277b3 commit 4ddc06d
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions leaf/src/proxy/chain/outbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/direct/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/drop/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/redirect/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/select/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/shadowsocks/inbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod stream;
mod datagram;
mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;

use super::shadow;
4 changes: 2 additions & 2 deletions leaf/src/proxy/shadowsocks/outbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;

use super::shadow;
4 changes: 2 additions & 2 deletions leaf/src/proxy/socks/inbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod stream;
mod datagram;
mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
2 changes: 1 addition & 1 deletion leaf/src/proxy/socks/outbound/datagram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ where
.map_ok(|_| buf.len())
.map_err(|x| Error::new(ErrorKind::Other, x))
.await
},
}
SocksAddr::Domain(domain, port) => {
self.0
.send_to(buf, (domain.to_owned(), *port))
Expand Down
4 changes: 2 additions & 2 deletions leaf/src/proxy/socks/outbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod stream;
mod datagram;
mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/static/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;

enum Method {
Random,
Expand Down
4 changes: 2 additions & 2 deletions leaf/src/proxy/trojan/outbound/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
4 changes: 2 additions & 2 deletions leaf/src/proxy/tryall/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub mod stream;
pub mod datagram;
pub mod stream;

pub use stream::Handler as StreamHandler;
pub use datagram::Handler as DatagramHandler;
pub use stream::Handler as StreamHandler;
2 changes: 1 addition & 1 deletion leaf/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn new_socks_outbound(socks_addr: &str, socks_port: u16) -> AnyOutboundHandler {
));
let outbound_manager =
leaf::app::outbound::manager::OutboundManager::new(&config.outbounds, dns_client).unwrap();

(outbound_manager.get("socks").unwrap()) as _
}

Expand Down

0 comments on commit 4ddc06d

Please sign in to comment.