Simplify match in text_query::is_func

This commit is contained in:
Colin Benner 2018-11-21 15:04:32 +01:00 committed by Tiffany Bennett
parent b042663807
commit da9313f6fe

View file

@ -430,26 +430,9 @@ pub type Iter<'a> = Peekable<TokenIterator<'a>>;
fn is_func(name: &str) -> bool {
match name {
"sqrt" => true,
"exp" => true,
"ln" => true,
"log" => true,
"log2" => true,
"log10" => true,
"hypot" => true,
"sin" => true,
"cos" => true,
"tan" => true,
"asin" => true,
"acos" => true,
"atan" => true,
"atan2" => true,
"sinh" => true,
"cosh" => true,
"tanh" => true,
"asinh" => true,
"acosh" => true,
"atanh" => true,
"sqrt" | "exp" | "ln" | "log" | "log2" | "log10" | "hypot" | "sin" |
"cos" | "tan" | "asin" | "acos" | "atan" | "atan2" | "sinh" | "cosh" |
"tanh" | "asinh" | "acosh" | "atanh" => true,
_ => false
}
}