mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
Merge pull request #648 from jbcrail/rm-unused-mutation
Remove unused mutation from variables.
This commit is contained in:
commit
860ee57573
5 changed files with 7 additions and 7 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue