diff --git a/src/uu/dirname/src/dirname.rs b/src/uu/dirname/src/dirname.rs index 63ee57272..8d85dc85e 100644 --- a/src/uu/dirname/src/dirname.rs +++ b/src/uu/dirname/src/dirname.rs @@ -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; diff --git a/src/uu/hostid/src/hostid.rs b/src/uu/hostid/src/hostid.rs index b0f68968d..180c4d2e5 100644 --- a/src/uu/hostid/src/hostid.rs +++ b/src/uu/hostid/src/hostid.rs @@ -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; diff --git a/src/uu/hostname/src/hostname.rs b/src/uu/hostname/src/hostname.rs index 69602fc0a..14f8b9df2 100644 --- a/src/uu/hostname/src/hostname.rs +++ b/src/uu/hostname/src/hostname.rs @@ -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);