mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 01:05:01 +02:00
Fix more command tests (#4481)
This commit is contained in:
@ -115,7 +115,15 @@ fn extract_headers(value: &Value, config: &Config) -> Result<Vec<String>, ShellE
|
||||
match value {
|
||||
Value::Record { vals, .. } => Ok(vals
|
||||
.iter()
|
||||
.map(|value| value.into_string("", config))
|
||||
.enumerate()
|
||||
.map(|(idx, value)| {
|
||||
let col = value.into_string("", config);
|
||||
if col.is_empty() {
|
||||
format!("Column{}", idx)
|
||||
} else {
|
||||
col
|
||||
}
|
||||
})
|
||||
.collect::<Vec<String>>()),
|
||||
Value::List { vals, span } => vals
|
||||
.iter()
|
||||
|
Reference in New Issue
Block a user