[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 answers = "n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -121,7 +121,7 @@ mod test {
|
||||||
let answers = "n\n";
|
let answers = "n\n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -131,7 +131,7 @@ mod test {
|
||||||
let answers = "n";
|
let answers = "n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -141,7 +141,7 @@ mod test {
|
||||||
let answers = "n\n";
|
let answers = "n\n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -151,7 +151,7 @@ mod test {
|
||||||
let answers = "y";
|
let answers = "y";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -161,7 +161,7 @@ mod test {
|
||||||
let answers = "y\n";
|
let answers = "y\n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -171,7 +171,7 @@ mod test {
|
||||||
let answers = "n";
|
let answers = "n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -181,7 +181,7 @@ mod test {
|
||||||
let answers = "y";
|
let answers = "y";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -191,7 +191,7 @@ mod test {
|
||||||
let answers = "\n";
|
let answers = "\n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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]
|
#[test]
|
||||||
|
@ -201,7 +201,7 @@ mod test {
|
||||||
let answers = "\n";
|
let answers = "\n";
|
||||||
let mut sink: Vec<u8> = vec![];
|
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())
|
.values_of(id_argument_name())
|
||||||
.ok_or(err_msg("CLI error"))
|
.ok_or(err_msg("CLI error"))
|
||||||
.and_then(|vals| {
|
.and_then(|vals| {
|
||||||
vals.into_iter()
|
vals
|
||||||
.fold(Ok(vec![]), |acc, elem| {
|
.fold(Ok(vec![]), |acc, elem| {
|
||||||
acc.and_then(|mut v| {
|
acc.and_then(|mut v| {
|
||||||
let elem = StoreId::new(PathBuf::from(String::from(elem)))?;
|
let elem = StoreId::new(PathBuf::from(String::from(elem)))?;
|
||||||
|
|
Loading…
Reference in a new issue