forked from extern/nushell
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:
@ -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![],
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user