From 8d815c9516be1e47505ec8b6cf48841cf8af4a7f Mon Sep 17 00:00:00 2001 From: parazyd Date: Wed, 20 Oct 2021 21:31:28 +0200 Subject: [PATCH] bin/drk: Don't separate table rows when printing balances. --- src/bin/drk.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/drk.rs b/src/bin/drk.rs index 38293418b..71a5e279a 100644 --- a/src/bin/drk.rs +++ b/src/bin/drk.rs @@ -5,7 +5,7 @@ use std::str::FromStr; extern crate prettytable; use clap::{clap_app, ArgMatches}; use log::debug; -use prettytable::Table; +use prettytable::{format, Table}; use serde_json::{json, Value}; use drk::cli::{Config, DrkConfig}; @@ -182,7 +182,8 @@ async fn start(config: &DrkConfig, options: ArgMatches<'_>) -> Result<()> { if matches.is_present("balances") { let reply = client.get_balances().await?; let mut table = Table::new(); - table.add_row(row!["token", "amount", "network"]); + table.set_format(*format::consts::FORMAT_NO_LINESEP_WITH_TITLE); + table.set_titles(row!["token", "amount", "network"]); if reply.as_object().is_some() { for (tkn, data) in reply.as_object().unwrap() {