aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/args.rs11
-rw-r--r--src/main.rs1
2 files changed, 7 insertions, 5 deletions
diff --git a/src/args.rs b/src/args.rs
index ae58ce2..f96cba4 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -7,6 +7,7 @@ use structopt::StructOpt;
#[derive(StructOpt, Debug, PartialEq, Eq, Clone)]
#[structopt(author, about)]
+#[allow(clippy::struct_excessive_bools)]
pub(crate) struct Args {
/// Cause environment variables, including those with null values, to override macro
/// assignments within makefiles.
@@ -127,7 +128,7 @@ impl Args {
fn from_given_args_and_given_env(
mut args: impl Iterator<Item = OsString>,
env_makeflags: String,
- ) -> Args {
+ ) -> Self {
// POSIX spec says "Any options specified in the MAKEFLAGS environment variable
// shall be evaluated before any options specified on the make utility command
// line."
@@ -149,16 +150,16 @@ impl Args {
let env_makeflags = env_makeflags.split_whitespace().map(OsString::from);
// per the structopt docs, the first argument will be used as the binary name,
// so we need to make sure it goes in before MAKEFLAGS
- let arg0 = args.next().unwrap_or_else(|| env!("CARGO_PKG_NAME").into());
+ let arg_0 = args.next().unwrap_or_else(|| env!("CARGO_PKG_NAME").into());
- let args = iter::once(arg0)
+ let args = iter::once(arg_0)
.chain(env_makeflags.into_iter())
.chain(args);
- Args::from_iter(args)
+ Self::from_iter(args)
}
- pub(crate) fn from_env_and_args() -> Args {
+ pub(crate) fn from_env_and_args() -> Self {
let env_makeflags = env::var("MAKEFLAGS").unwrap_or_default();
let args = env::args_os();
Self::from_given_args_and_given_env(args, env_makeflags)
diff --git a/src/main.rs b/src/main.rs
index 40303d3..0720ada 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,6 +8,7 @@
clippy::cargo,
clippy::nursery
)]
+#![allow(clippy::redundant_pub_crate)]
use std::fs::metadata;
use std::io::stdin;