diff --git a/mkmain.rs b/mkmain.rs index c4d50d526..4ae471c41 100644 --- a/mkmain.rs +++ b/mkmain.rs @@ -3,7 +3,7 @@ use std::fs::File; use std::io::Write; use std::path::Path; -static TEMPLATE: &'static str = "\ +static TEMPLATE: &str = "\ extern crate uu_@UTIL_CRATE@; extern crate uucore; diff --git a/src/factor/build.rs b/src/factor/build.rs index 0ef305c19..ba9ac6f19 100644 --- a/src/factor/build.rs +++ b/src/factor/build.rs @@ -137,7 +137,7 @@ fn test_generator() { } const MAX_WIDTH: usize = 102; -const PREAMBLE: &'static str = r##"/* +const PREAMBLE: &str = r##"/* * This file is part of the uutils coreutils package. * * (c) kwantam diff --git a/src/factor/sieve.rs b/src/factor/sieve.rs index 85d846b19..6ae2cac1b 100644 --- a/src/factor/sieve.rs +++ b/src/factor/sieve.rs @@ -126,11 +126,11 @@ impl Wheel { /// The increments of a wheel of circumference 210 /// (i.e., a wheel that skips all multiples of 2, 3, 5, 7) -const WHEEL_INCS: &'static [u64] = &[ +const WHEEL_INCS: &[u64] = &[ 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4, 2, 4, 8, 6, 4, 6, 2, 4, 6, 2, 6, 6, 4, 2, 4, 6, 2, 6, 4, 2, 4, 2, 10, 2, 10, ]; -const INIT_PRIMES: &'static [u64] = &[2, 3, 5, 7]; +const INIT_PRIMES: &[u64] = &[2, 3, 5, 7]; /// A min-heap of "infinite lists" of prime multiples, where a list is /// represented as (head, increment). diff --git a/tests/common/util.rs b/tests/common/util.rs index ce0779077..7ac373c8b 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -18,18 +18,17 @@ use std::thread::sleep; use std::time::Duration; #[cfg(windows)] -static PROGNAME: &'static str = "uutils.exe"; +static PROGNAME: &str = "uutils.exe"; #[cfg(not(windows))] -static PROGNAME: &'static str = "uutils"; +static PROGNAME: &str = "uutils"; -static TESTS_DIR: &'static str = "tests"; -static FIXTURES_DIR: &'static str = "fixtures"; +static TESTS_DIR: &str = "tests"; +static FIXTURES_DIR: &str = "fixtures"; -static ALREADY_RUN: &'static str = - " you have already run this UCommand, if you want to run \ +static ALREADY_RUN: &str = " you have already run this UCommand, if you want to run \ another command in the same test, use TestScenario::new instead of \ testing();"; -static MULTIPLE_STDIN_MEANINGLESS: &'static str = "Ucommand is designed around a typical use case of: provide args and input stream -> spawn process -> block until completion -> return output streams. For verifying that a particular section of the input stream is what causes a particular behavior, use the Command type directly."; +static MULTIPLE_STDIN_MEANINGLESS: &str = "Ucommand is designed around a typical use case of: provide args and input stream -> spawn process -> block until completion -> return output streams. For verifying that a particular section of the input stream is what causes a particular behavior, use the Command type directly."; /// Test if the program is running under WSL // ref: @@