rustfmt project and change binary name

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2025-12-21 16:47:19 +03:00
parent 813667093e
commit 35296f13b0
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
4 changed files with 18 additions and 15 deletions

2
Cargo.lock generated
View File

@ -1270,7 +1270,7 @@ dependencies = [
]
[[package]]
name = "ghost-gossiper"
name = "ghost-echo"
version = "0.0.1"
dependencies = [
"anyhow",

View File

@ -1,10 +1,10 @@
[package]
name = "ghost-echo"
version = "0.0.1"
version = "0.0.2"
edition = "2021"
[[bin]]
name = "ghost-gossiper"
name = "ghost-echo"
path = "src/bin/main.rs"
[dependencies]

View File

@ -1,4 +1,4 @@
use ghost_gossiper::prelude::*;
use ghost_echo::prelude::*;
use anyhow::Result;
use clap::Parser;

View File

@ -19,7 +19,11 @@ use ratatui::{
Terminal,
};
use std::{
collections::{HashSet, VecDeque}, hash::{DefaultHasher, Hash, Hasher}, io, option::Option, time::Duration
collections::{HashSet, VecDeque},
hash::{DefaultHasher, Hash, Hasher},
io,
option::Option,
time::Duration,
};
use tokio::sync::mpsc::{self, Receiver, Sender};
use tokio_util::sync::CancellationToken;
@ -243,7 +247,8 @@ fn wrap_text<'a>(line: Line<'a>, max_width: usize) -> Vec<Line<'a>> {
return vec![Line::from("")];
}
let leading_whitespace = words_with_styles[0].0
let leading_whitespace = words_with_styles[0]
.0
.chars()
.take_while(|c| c.is_whitespace())
.collect::<String>();
@ -427,15 +432,13 @@ impl<'a> ChatWidget<'a> {
let color_index = (hash % 216) as u8 + 16;
self.chat.add_line(
Line::from(vec![
time_str.to_string().into(),
" ".into(),
peer.fg(Color::Indexed(color_index)),
": ".into(),
message.into().into()
])
)
self.chat.add_line(Line::from(vec![
time_str.to_string().into(),
" ".into(),
peer.fg(Color::Indexed(color_index)),
": ".into(),
message.into().into(),
]))
}
}