diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-01-13 09:50:30 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-01-15 23:21:39 +0100 |
commit | 5ad87b936e863940798336e94945e7bd7859b627 (patch) | |
tree | a97070b0c61315f03f6d2831a7006c8a2619ce77 /src/commands/db.rs | |
parent | b3a130bb4b7959084482645b9dbd2e96df9682d2 (diff) |
Fix clippy: field assignment outside of initializer for an instance created with Default::default()
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/commands/db.rs')
-rw-r--r-- | src/commands/db.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/commands/db.rs b/src/commands/db.rs index ed6360f..4ac1257 100644 --- a/src/commands/db.rs +++ b/src/commands/db.rs @@ -533,11 +533,12 @@ fn display_data<D: Display>(headers: Vec<ascii_table::Column>, data: Vec<Vec<D>> } else { if atty::is(atty::Stream::Stdout) { - let mut ascii_table = ascii_table::AsciiTable::default(); - - ascii_table.max_width = terminal_size::terminal_size() - .map(|tpl| tpl.0.0 as usize) // an ugly interface indeed! - .unwrap_or(80); + let mut ascii_table = ascii_table::AsciiTable { + columns: Default::default(), + max_width: terminal_size::terminal_size() + .map(|tpl| tpl.0.0 as usize) // an ugly interface indeed! + .unwrap_or(80), + }; headers.into_iter() .enumerate() |