Add version to repl.

This commit is contained in:
Stephen Chung
2021-04-21 17:39:45 +08:00
parent 956c57e9d6
commit cc546fcaab
2 changed files with 80 additions and 77 deletions

View File

@@ -55,8 +55,9 @@ fn print_help() {
}
fn main() {
println!("Rhai REPL tool");
println!("==============");
let title = format!("Rhai REPL tool (version {})", env!("CARGO_PKG_VERSION"));
println!("{}", title);
println!("{0:=<1$}", "", title.len());
print_help();
// Initialize scripting engine