mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:35:56 +02:00
Match cleanup (#2290)
This commit is contained in:
@ -37,16 +37,10 @@ pub fn view_text_value(value: &Value) {
|
||||
for (idx, value) in batvars.row_entries() {
|
||||
match idx.as_ref() {
|
||||
"term_width" => {
|
||||
term_width = match value.as_u64() {
|
||||
Ok(n) => n as usize,
|
||||
_ => term_width as usize,
|
||||
}
|
||||
term_width = value.as_u64().unwrap_or(term_width as u64) as usize;
|
||||
}
|
||||
"tab_width" => {
|
||||
tab_width = match value.as_u64() {
|
||||
Ok(n) => n,
|
||||
_ => 4u64,
|
||||
}
|
||||
tab_width = value.as_u64().unwrap_or(4 as u64);
|
||||
}
|
||||
"colored_output" => colored_output = value.as_bool().unwrap_or(true),
|
||||
"true_color" => true_color = value.as_bool().unwrap_or(true),
|
||||
|
Reference in New Issue
Block a user