Explorar o código

feat: commit code

YuKun Liu %!s(int64=3) %!d(string=hai) anos
pai
achega
bfaa8e3c74
Modificáronse 1 ficheiros con 1 adicións e 19 borrados
  1. 1 19
      src/server/mod.rs

+ 1 - 19
src/server/mod.rs

@@ -518,24 +518,6 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions)
                     format!("{}~{}", line.0, line.1)
                 };
                 let code = span.text.clone();
-                // let span_info = format!(
-                //     "[{}: {}]: {} --> {}",
-                //     file,
-                // if line.0 == line.1 {
-                //     line.0.to_string()
-                // } else {
-                //     format!("{}~{}", line.0, line.1)
-                // },
-                //     if code.len() == 1 {
-                //         code.get(0).unwrap().text.trim().blue().bold().to_string()
-                //     } else {
-                // format!("\n{}",code.iter()
-                //     .enumerate()
-                //     .map(|(_i, s)| format!("\t{}\n", s.text).blue().bold().to_string())
-                //     .collect::<String>())
-                //     },
-                //     message.yellow().bold()
-                // );
                 let span_info = if code.len() == 1 {
                     let code = code.get(0).unwrap().text.trim().blue().bold().to_string();
                     format!(
@@ -551,7 +533,7 @@ fn print_console_info(port: u16, config: &CrateConfig, options: PrettierOptions)
                         .enumerate()
                         .map(|(_i, s)| format!("\t{}\n", s.text).blue().bold().to_string())
                         .collect::<String>();
-                    format!("[{}: {}]:\n{}", file, line_str, code)
+                    format!("[{}: {}]:\n{}\n#:{}", file, line_str, code, message)
                 };
                 console = format!("{console}\n\t{span_info}");
             }