Match cleanup (#2294)

* Delete unnecessary match

* Use `unwrap_or_else()`

* Whitespace was trim on file save

* Use `map_or_else()`

* Use a default to group all match arms with same output

* Clippy made me do it
This commit is contained in:
Joseph T. Lyons
2020-08-03 13:43:27 -04:00
committed by GitHub
parent 3a7869b422
commit eeb9b4edcb
5 changed files with 8 additions and 24 deletions

View File

@ -52,11 +52,8 @@ impl UntaggedValue {
/// Get the corresponding descriptors (column names) associated with this value
pub fn data_descriptors(&self) -> Vec<String> {
match self {
UntaggedValue::Primitive(_) => vec![],
UntaggedValue::Row(columns) => columns.entries.keys().map(|x| x.to_string()).collect(),
UntaggedValue::Block(_) => vec![],
UntaggedValue::Table(_) => vec![],
UntaggedValue::Error(_) => vec![],
_ => vec![],
}
}