[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:
parent
cb9068d7fb
commit
bde29b7242
2 changed files with 11 additions and 11 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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)))?;
|
||||
|
|
Loading…
Reference in a new issue