Skip to content

Commit

Permalink
update cfg target_os unix to linux
Browse files Browse the repository at this point in the history
  • Loading branch information
kwsc98 committed May 15, 2024
1 parent 8c86537 commit a3c62c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dubbo/src/triple/transport/connector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

pub mod http_connector;
pub mod https_connector;
#[cfg(any(target_os = "macos", target_os = "unix"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
pub mod unix_connector;

use hyper::Uri;
Expand Down Expand Up @@ -84,7 +84,7 @@ pub fn get_connector(connector: &str) -> BoxCloneService<Uri, BoxIO, crate::Erro
let c = https_connector::HttpsConnector::new();
BoxCloneService::new(Connector::new(c))
}
#[cfg(any(target_os = "macos", target_os = "unix"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
"unix" => {
let c = unix_connector::UnixConnector::new();
BoxCloneService::new(Connector::new(c))
Expand Down
4 changes: 2 additions & 2 deletions dubbo/src/triple/transport/listener/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pub mod tcp_listener;
#[cfg(any(target_os = "macos", target_os = "unix"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
pub mod unix_listener;

use std::net::SocketAddr;
Expand Down Expand Up @@ -65,7 +65,7 @@ impl<T: Listener> Listener for WrappedListener<T> {
pub async fn get_listener(name: String, addr: SocketAddr) -> Result<BoxListener, crate::Error> {
match name.as_str() {
"tcp" => Ok(TcpListener::bind(addr).await?.boxed()),
#[cfg(any(target_os = "macos", target_os = "unix"))]
#[cfg(any(target_os = "macos", target_os = "linux"))]
"unix" => Ok(unix_listener::UnixListener::bind(addr).await?.boxed()),
_ => {
warn!("no support listener: {:?}", name);
Expand Down

0 comments on commit a3c62c4

Please sign in to comment.