Remove imports and cleanups (#3590)

* Remove unused import and if else chain
This commit is contained in:
Quentin Le Sceller
2021-03-08 11:09:41 -05:00
committed by GitHub
parent 45f74c396d
commit 725622da7a
22 changed files with 17 additions and 48 deletions
+1 -2
View File
@@ -24,7 +24,6 @@ use crate::config::GlobalConfig;
use crate::p2p::types::PeerInfoDisplay;
use crate::util::file::get_first_line;
use serde_json::json;
use term;
const ENDPOINT: &str = "/v2/owner";
@@ -155,7 +154,7 @@ pub fn client_command(client_args: &ArgMatches<'_>, global_config: GlobalConfig)
// just get defaults from the global config
let server_config = global_config.members.unwrap().server;
let api_secret = get_first_line(server_config.api_secret_path.clone());
let node_client = HTTPNodeClient::new(&server_config.api_http_addr, api_secret.clone());
let node_client = HTTPNodeClient::new(&server_config.api_http_addr, api_secret);
match client_args.subcommand() {
("status", Some(_)) => {
-1
View File
@@ -20,7 +20,6 @@ use std::thread;
use std::time::Duration;
use clap::ArgMatches;
use ctrlc;
use crate::config::GlobalConfig;
use crate::p2p::Seeding;
+1 -1
View File
@@ -16,7 +16,7 @@
use std::cmp::Ordering;
use crate::tui::chrono::prelude::{DateTime, NaiveDateTime, Utc};
use chrono::prelude::{DateTime, NaiveDateTime, Utc};
use cursive::direction::Orientation;
use cursive::event::Key;
use cursive::traits::{Boxable, Identifiable};
-4
View File
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! Grin TUI
use chrono;
use humansize;
//
mod constants;
mod logs;
mod menu;
+1 -1
View File
@@ -18,8 +18,8 @@ use std::cmp::Ordering;
use crate::servers::{PeerStats, ServerStats};
use crate::tui::humansize::{file_size_opts::CONVENTIONAL, FileSize};
use chrono::prelude::*;
use humansize::{file_size_opts::CONVENTIONAL, FileSize};
use cursive::direction::Orientation;
use cursive::event::Key;