mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #648 from jbcrail/rm-unused-mutation
Remove unused mutation from variables.
This commit is contained in:
@@ -68,8 +68,8 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
},
|
||||
None => 76
|
||||
};
|
||||
let mut stdin_buf;
|
||||
let mut file_buf;
|
||||
let stdin_buf;
|
||||
let file_buf;
|
||||
let mut input = if matches.free.is_empty() || &matches.free[0][..] == "-" {
|
||||
stdin_buf = stdin();
|
||||
BufReader::new(Box::new(stdin_buf) as Box<Read+'static>)
|
||||
|
||||
@@ -127,7 +127,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
}
|
||||
|
||||
fn open(path: String) -> BufReader<Box<Read+'static>> {
|
||||
let mut file_buf;
|
||||
let file_buf;
|
||||
if path == "-" {
|
||||
BufReader::new(Box::new(stdin()) as Box<Read>)
|
||||
} else {
|
||||
|
||||
@@ -169,8 +169,8 @@ fn hashsum<'a>(algoname: &str, mut digest: Box<Digest+'a>, files: Vec<String>, b
|
||||
};
|
||||
for filename in files.iter() {
|
||||
let filename: &str = filename;
|
||||
let mut stdin_buf;
|
||||
let mut file_buf;
|
||||
let stdin_buf;
|
||||
let file_buf;
|
||||
let mut file = BufReader::new(
|
||||
if filename == "-" {
|
||||
stdin_buf = stdin();
|
||||
|
||||
@@ -119,7 +119,7 @@ pub fn uumain(args: Vec<String>) -> i32 {
|
||||
}
|
||||
|
||||
fn open(path: String) -> BufReader<Box<Read+'static>> {
|
||||
let mut file_buf;
|
||||
let file_buf;
|
||||
if path == "-" {
|
||||
BufReader::new(Box::new(stdin()) as Box<Read>)
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ fn test_random() {
|
||||
let mut factors = Vec::new();
|
||||
while product < min {
|
||||
// log distribution---higher probability for lower numbers
|
||||
let mut factor;
|
||||
let factor;
|
||||
loop {
|
||||
let next = rng.gen_range(0f64, LOG_PRIMES).exp2().floor() as usize;
|
||||
if next < NUM_PRIMES {
|
||||
|
||||
Reference in New Issue
Block a user