Merge branch 'master' into master

This commit is contained in:
YuKun Liu authored and GitHub committed 2022-09-25 13:55:46 +08:00
commit 52e8d9f357
1 file changed
+9 -11
+9 -11
View File
@@ -194,8 +194,8 @@ pub async fn startup_hot_reload(port: u16, config: CrateConfig) -> Result<()> {
} }
} }
} }
if !messages.is_empty() { if updated {
let _ = hot_reload_tx.send(SetManyRsxMessage(messages)); last_update_time = chrono::Local::now().timestamp();
} }
} }
last_update_time = chrono::Local::now().timestamp(); last_update_time = chrono::Local::now().timestamp();
@@ -427,19 +427,17 @@ pub struct PrettierOptions {
} }
fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) { fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions) {
print!( if let Ok(native_clearseq) = Command::new(if cfg!(target_os = "windows") {
"{}",
String::from_utf8_lossy(
&Command::new(if cfg!(target_os = "windows") {
"cls" "cls"
} else { } else {
"clear" "clear"
}) })
.output() .output() {
.unwrap() print!("{}", String::from_utf8_lossy(&native_clearseq.stdout));
.stdout } else {
) // Try ANSI-Escape characters
); print!("\x1b[2J\x1b[H");
}
// for path in &changed { // for path in &changed {
// let path = path // let path = path