mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Fix clippy warning
Useless use of format
This commit is contained in:
parent
16a5faf886
commit
d5b2320a59
1 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,8 @@ use clap::{crate_version, App, Arg, ArgMatches};
|
||||||
use std::collections::hash_set::HashSet;
|
use std::collections::hash_set::HashSet;
|
||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
use std::str;
|
use std::str;
|
||||||
|
#[cfg(windows)]
|
||||||
|
use uucore::error::UUsageError;
|
||||||
use uucore::error::{UResult, USimpleError};
|
use uucore::error::{UResult, USimpleError};
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
|
@ -40,7 +42,10 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
let mut data = std::mem::uninitialized();
|
let mut data = std::mem::uninitialized();
|
||||||
if WSAStartup(MAKEWORD(2, 2), &mut data as *mut _) != 0 {
|
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);
|
let result = execute(args);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue