From 5542698467c1ef156a8856cdbff0837c32634b28 Mon Sep 17 00:00:00 2001 From: ardocrat Date: Tue, 11 Jul 2023 23:37:17 +0300 Subject: [PATCH] build: remove unused imports --- src/gui/views/network/configs/p2p.rs | 3 +-- src/gui/views/network/container.rs | 9 +++------ src/node/config.rs | 7 +++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/gui/views/network/configs/p2p.rs b/src/gui/views/network/configs/p2p.rs index 1235858..5c005fa 100644 --- a/src/gui/views/network/configs/p2p.rs +++ b/src/gui/views/network/configs/p2p.rs @@ -12,8 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::fmt::format; -use egui::{Direction, Id, Layout, RichText, Rounding, Stroke, TextStyle, Ui, Widget}; +use egui::{Id, RichText, Rounding, Stroke, TextStyle, Ui, Widget}; use egui_extras::{Size, StripBuilder}; use grin_core::global::ChainTypes; diff --git a/src/gui/views/network/container.rs b/src/gui/views/network/container.rs index 5813d59..c3e31e7 100644 --- a/src/gui/views/network/container.rs +++ b/src/gui/views/network/container.rs @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::time::Duration; - use egui::{Color32, lerp, Rgba, RichText}; use egui::style::Margin; use egui_extras::{Size, StripBuilder}; @@ -234,16 +232,15 @@ impl NetworkContainer { fn title_text_ui(&self, builder: StripBuilder) { builder .size(Size::remainder()) - .size(Size::exact(30.0)) + .size(Size::exact(28.0)) .vertical(|mut strip| { strip.cell(|ui| { - ui.add_space(3.0); + ui.add_space(4.0); ui.vertical_centered(|ui| { ui.label(RichText::new(self.current_tab.get_type().name().to_uppercase()) - .size(18.0) + .size(19.0) .color(Colors::TITLE)); }); - ui.add_space(1.0); }); strip.cell(|ui| { ui.centered_and_justified(|ui| { diff --git a/src/node/config.rs b/src/node/config.rs index 7c73aa3..e3d9dcc 100644 --- a/src/node/config.rs +++ b/src/node/config.rs @@ -14,21 +14,20 @@ use std::fs::File; use std::io::{BufRead, BufReader, Write}; -use std::net::{IpAddr, Ipv4Addr, SocketAddr, SocketAddrV4, TcpListener, ToSocketAddrs}; +use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4, TcpListener, ToSocketAddrs}; use std::path::PathBuf; use std::str::FromStr; -use egui::Key::P; use grin_config::{config, ConfigError, ConfigMembers, GlobalConfig}; use grin_config::config::{API_SECRET_FILE_NAME, FOREIGN_API_SECRET_FILE_NAME, SERVER_CONFIG_FILE_NAME}; use grin_core::global::ChainTypes; -use grin_p2p::msg::PeerAddrs; use grin_p2p::{PeerAddr, Seeding}; +use grin_p2p::msg::PeerAddrs; use grin_servers::common::types::ChainValidationMode; use serde::{Deserialize, Serialize}; -use crate::node::Node; use crate::{AppConfig, Settings}; +use crate::node::Node; /// Peers config to save peers DNS names into the file. #[derive(Serialize, Deserialize, Default)]