mirror of
https://github.com/samsonjs/agate.git
synced 2026-03-25 09:05:50 +00:00
simplify conditional unix compilation
This commit is contained in:
parent
90a4f666fd
commit
3765f8a515
1 changed files with 4 additions and 4 deletions
|
|
@ -32,9 +32,9 @@ use {
|
|||
url::{Host, Url},
|
||||
};
|
||||
|
||||
#[cfg(target_family = "unix")]
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::fs::FileTypeExt;
|
||||
#[cfg(target_family = "unix")]
|
||||
#[cfg(unix)]
|
||||
use tokio::net::{UnixListener, UnixStream};
|
||||
|
||||
static DEFAULT_PORT: u16 = 1965;
|
||||
|
|
@ -101,7 +101,7 @@ fn main() {
|
|||
}))
|
||||
};
|
||||
|
||||
#[cfg(target_family = "unix")]
|
||||
#[cfg(unix)]
|
||||
for socketpath in &ARGS.sockets {
|
||||
let arc = mimetypes.clone();
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ fn args() -> Result<Args> {
|
|||
&format!("Address to listen on (default 0.0.0.0:{DEFAULT_PORT} and [::]:{DEFAULT_PORT}; multiple occurences means listening on multiple interfaces)"),
|
||||
"IP:PORT",
|
||||
);
|
||||
#[cfg(target_family = "unix")]
|
||||
#[cfg(unix)]
|
||||
opts.optmulti(
|
||||
"",
|
||||
"socket",
|
||||
|
|
|
|||
Loading…
Reference in a new issue