Skip to content

Commit

Permalink
beautify display of configuration when starting up
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Apr 27, 2022
1 parent 0625537 commit f75d704
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kaminari-cmd"
version = "0.5.0"
version = "0.5.1"
edition = "2021"
authors = ["zephyr <[email protected]>"]
repository = "https://github.com/zephyrchien/kaminari/cmd"
Expand All @@ -9,7 +9,7 @@ readme = "README.md"
license = "GPL-3.0"

[dependencies]
kaminari = "0.7.0"
kaminari = "0.7.1"
realm_io = "0.2.1"
tokio = { version = "1", features = ["rt", "net", "macros"] }
anyhow = "1"
Expand Down
11 changes: 9 additions & 2 deletions cmd/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ async fn main() -> Result<()> {

eprintln!("listen: {}", &local);
eprintln!("remote: {}", &remote);
eprintln!("ws: {:?}", &ws);
eprintln!("tls: {:?}", &tls);

if let Some(ws) = &ws {
eprintln!("ws: {}", ws)
}

if let Some(tls) = &tls {
eprintln!("tls: {}", &tls);
}

let lis = TcpListener::bind(local).await?;

macro_rules! run {
($cc: expr) => {
println!("connect: {}", $cc.as_ref());
loop {
match lis.accept().await {
Ok((stream, _)) => {
Expand Down
11 changes: 9 additions & 2 deletions cmd/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,20 @@ async fn main() -> Result<()> {

eprintln!("listen: {}", &local);
eprintln!("remote: {}", &remote);
eprintln!("ws: {:?}", &ws);
eprintln!("tls: {:?}", &tls);

if let Some(ws) = &ws {
eprintln!("ws: {}", ws)
}

if let Some(tls) = &tls {
eprintln!("tls: {}", &tls);
}

let lis = TcpListener::bind(local).await?;

macro_rules! run {
($ac: expr) => {
println!("accept: {}", $ac.as_ref());
loop {
match lis.accept().await {
Ok((stream, _)) => {
Expand Down

0 comments on commit f75d704

Please sign in to comment.