1
Fork 0
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:
Sylvestre Ledru 2021-07-06 12:30:12 +02:00
parent 16a5faf886
commit d5b2320a59

View file

@ -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);