clippy
This commit is contained in:
parent
813c545e06
commit
348aeea095
@ -161,13 +161,12 @@ fn hint_to_string() {
|
|||||||
fn invalid_function() {
|
fn invalid_function() {
|
||||||
SUPPORTED_FUNCTIONS
|
SUPPORTED_FUNCTIONS
|
||||||
.iter()
|
.iter()
|
||||||
.map(|func1| {
|
.flat_map(|func1| {
|
||||||
SUPPORTED_FUNCTIONS
|
SUPPORTED_FUNCTIONS
|
||||||
.iter()
|
.iter()
|
||||||
.map(|func2| func1.to_string() + func2)
|
.map(|func2| func1.to_string() + func2)
|
||||||
.collect::<Vec<String>>()
|
.collect::<Vec<String>>()
|
||||||
})
|
})
|
||||||
.flatten()
|
|
||||||
.filter(|func| !SUPPORTED_FUNCTIONS.contains(&func.as_str()))
|
.filter(|func| !SUPPORTED_FUNCTIONS.contains(&func.as_str()))
|
||||||
.for_each(|key| {
|
.for_each(|key| {
|
||||||
let split = parsing::split_function(&key);
|
let split = parsing::split_function(&key);
|
||||||
@ -180,7 +179,7 @@ fn invalid_function() {
|
|||||||
if generated_hint.is_none() {
|
if generated_hint.is_none() {
|
||||||
println!("success: {}", key);
|
println!("success: {}", key);
|
||||||
} else {
|
} else {
|
||||||
panic!("failed: {} (Hint: '{}')", key, generated_hint.to_string());
|
panic!("failed: {} (Hint: '{}')", key, generated_hint);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -216,7 +215,7 @@ fn hint_tests() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
let hint = Hint::Single(&"");
|
let hint = Hint::Single("");
|
||||||
assert!(!hint.is_none());
|
assert!(!hint.is_none());
|
||||||
assert!(hint.is_some());
|
assert!(hint.is_some());
|
||||||
assert!(hint.is_single());
|
assert!(hint.is_single());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user