mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 23:32:39 +00:00
commit
2a6fe0fd3b
3 changed files with 15 additions and 1 deletions
|
@ -5,6 +5,9 @@
|
|||
// For the full copyright and license information, please view the LICENSE
|
||||
// file that was distributed with this source code.
|
||||
|
||||
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
#![allow(clippy::nonstandard_macro_braces)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
// spell-checker:ignore (ToDO) gethostid
|
||||
|
||||
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
#![allow(clippy::nonstandard_macro_braces)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
// spell-checker:ignore (ToDO) MAKEWORD addrs hashset
|
||||
|
||||
// Clippy bug: https://github.com/rust-lang/rust-clippy/issues/7422
|
||||
#![allow(clippy::nonstandard_macro_braces)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate uucore;
|
||||
|
||||
|
@ -14,6 +17,8 @@ use clap::{crate_version, App, Arg, ArgMatches};
|
|||
use std::collections::hash_set::HashSet;
|
||||
use std::net::ToSocketAddrs;
|
||||
use std::str;
|
||||
#[cfg(windows)]
|
||||
use uucore::error::UUsageError;
|
||||
use uucore::error::{UResult, USimpleError};
|
||||
|
||||
#[cfg(windows)]
|
||||
|
@ -37,7 +42,10 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||
#[allow(deprecated)]
|
||||
let mut data = std::mem::uninitialized();
|
||||
if WSAStartup(MAKEWORD(2, 2), &mut data as *mut _) != 0 {
|
||||
return Err(USimpleError::new(1, format!("Failed to start Winsock 2.2")));
|
||||
return Err(UUsageError::new(
|
||||
1,
|
||||
"Failed to start Winsock 2.2".to_string(),
|
||||
));
|
||||
}
|
||||
}
|
||||
let result = execute(args);
|
||||
|
|
Loading…
Reference in a new issue