From aa05dc30545008e01f16da64f08045564693b2f3 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Wed, 7 Dec 2022 12:55:28 -0800 Subject: [PATCH] fix: builds of CLI --- Cargo.lock | 12 +----------- Cargo.toml | 23 +++++++++++++++-------- src/server/mod.rs | 7 +++---- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce848c1f7..b9d5c8d9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -572,7 +572,7 @@ dependencies = [ "chrono", "clap", "colored 2.0.0", - "convert_case", + "convert_case", "ctrlc", "dioxus-core", "dioxus-rsx", @@ -616,7 +616,6 @@ dependencies = [ "dyn-clone", "futures-channel", "futures-util", - "fxhash", "indexmap", "log", "longest-increasing-subsequence", @@ -907,15 +906,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.6" diff --git a/Cargo.toml b/Cargo.toml index a63ae6005..ed6ce7a18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,12 @@ walkdir = "2" # tools download dirs = "4.0.0" -reqwest = { version = "0.11", features = ["rustls-tls", "stream", "trust-dns", "blocking"] } +reqwest = { version = "0.11", features = [ + "rustls-tls", + "stream", + "trust-dns", + "blocking", +] } flate2 = "1.0.22" tar = "0.4.38" zip = "0.6.2" @@ -54,18 +59,20 @@ tower = "0.4.12" syn = { version = "1.0", features = ["full", "extra-traits"] } -dioxus-core = { git = "https://github.com/dioxuslabs/dioxus/", features = [ - "hot-reload", -] } -dioxus-rsx = { git = "https://github.com/dioxuslabs/dioxus/", features = [ - "hot-reload", -] } +dioxus-core = { git = "https://github.com/dioxuslabs/dioxus/" } +dioxus-rsx = { git = "https://github.com/dioxuslabs/dioxus/" } proc-macro2 = { version = "1.0", features = ["span-locations"] } lazy_static = "1.4.0" # plugin packages -mlua = { version = "0.8.1", features = ["lua54", "vendored", "async", "send", "macros"] } +mlua = { version = "0.8.1", features = [ + "lua54", + "vendored", + "async", + "send", + "macros", +] } ctrlc = "3.2.3" [[bin]] diff --git a/src/server/mod.rs b/src/server/mod.rs index 8bf7f3cb8..dde48f69c 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -237,7 +237,6 @@ pub async fn startup_hot_reload(port: u16, config: CrateConfig) -> Result<()> { .unwrap(); } - // start serve dev-server at 0.0.0.0:8080 print_console_info( port, @@ -453,13 +452,13 @@ pub struct PrettierOptions { } fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) { - if let Ok(native_clearseq) = Command::new(if cfg!(target_os = "windows") { "cls" } else { "clear" }) - .output() { + .output() + { print!("{}", String::from_utf8_lossy(&native_clearseq.stdout)); } else { // Try ANSI-Escape characters @@ -497,7 +496,7 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) "False" }; - if options.changed.len() <= 0 { + if options.changed.is_empty() { println!( "{} @ v{} [{}] \n", "Dioxus".bold().green(),