[Auto] lib/etc/interaction: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:51:55 +02:00 committed by Matthias Beyer
parent cb9068d7fb
commit bde29b7242
2 changed files with 11 additions and 11 deletions

View file

@ -111,7 +111,7 @@ mod test {
let answers = "n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -121,7 +121,7 @@ mod test {
let answers = "n\n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -131,7 +131,7 @@ mod test {
let answers = "n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -141,7 +141,7 @@ mod test {
let answers = "n\n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -151,7 +151,7 @@ mod test {
let answers = "y";
let mut sink: Vec<u8> = vec![];
assert!(true == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -161,7 +161,7 @@ mod test {
let answers = "y\n";
let mut sink: Vec<u8> = vec![];
assert!(true == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -171,7 +171,7 @@ mod test {
let answers = "n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -181,7 +181,7 @@ mod test {
let answers = "y";
let mut sink: Vec<u8> = vec![];
assert!(true == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -191,7 +191,7 @@ mod test {
let answers = "\n";
let mut sink: Vec<u8> = vec![];
assert!(false == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(!ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
#[test]
@ -201,7 +201,7 @@ mod test {
let answers = "\n";
let mut sink: Vec<u8> = vec![];
assert!(true == ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
assert!(ask_bool_(question, default, &mut BufReader::new(answers.as_bytes()), &mut sink).unwrap());
}
}

View file

@ -52,7 +52,7 @@ pub fn get_id(matches: &ArgMatches) -> Result<Vec<StoreId>> {
.values_of(id_argument_name())
.ok_or(err_msg("CLI error"))
.and_then(|vals| {
vals.into_iter()
vals
.fold(Ok(vec![]), |acc, elem| {
acc.and_then(|mut v| {
let elem = StoreId::new(PathBuf::from(String::from(elem)))?;