From c4a69f2f4e50f1d41b8004cc5f12966ce310ccf6 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Fri, 7 Feb 2020 03:20:40 -0600 Subject: [PATCH] refactor/polish ~ fix `cargo clippy` complaints (allow trivially_copy_pass_by_ref) --- src/factor/sieve.rs | 2 ++ src/stdbuf/stdbuf.rs | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/factor/sieve.rs b/src/factor/sieve.rs index d0a2711f2..85d846b19 100644 --- a/src/factor/sieve.rs +++ b/src/factor/sieve.rs @@ -68,6 +68,7 @@ impl Sieve { #[allow(dead_code)] #[inline] pub fn primes() -> PrimeSieve { + #[allow(clippy::trivially_copy_pass_by_ref)] fn deref(x: &u64) -> u64 { *x } @@ -78,6 +79,7 @@ impl Sieve { #[allow(dead_code)] #[inline] pub fn odd_primes() -> PrimeSieve { + #[allow(clippy::trivially_copy_pass_by_ref)] fn deref(x: &u64) -> u64 { *x } diff --git a/src/stdbuf/stdbuf.rs b/src/stdbuf/stdbuf.rs index c78105602..b91f86bb5 100644 --- a/src/stdbuf/stdbuf.rs +++ b/src/stdbuf/stdbuf.rs @@ -84,8 +84,7 @@ fn print_version() { fn print_usage(opts: &Options) { let brief = "Run COMMAND, with modified buffering operations for its standard streams\n \ Mandatory arguments to long options are mandatory for short options too."; - let explanation = - "If MODE is 'L' the corresponding stream will be line buffered.\n \ + let explanation = "If MODE is 'L' the corresponding stream will be line buffered.\n \ This option is invalid with standard input.\n\n \ If MODE is '0' the corresponding stream will be unbuffered.\n\n \ Otherwise MODE is a number which may be followed by one of the following:\n\n \