diff --git a/src/editor.rs b/src/editor.rs index 388bb971..7412e785 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -520,7 +520,7 @@ impl Editor { // Draw an empty row self.draw_left_padding(buffer, '~'); if self.is_empty() && i == self.screen_rows / 3 { - let welcome_message = format!("Kibi - version {}", env!("CARGO_PKG_VERSION")); + let welcome_message = concat!("Kibi - version ", env!("CARGO_PKG_VERSION")); buffer.push_str(&format!("{:^1$.1$}", welcome_message, self.screen_cols)); } } diff --git a/src/main.rs b/src/main.rs index c37f2f60..fca72b0b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ fn main() -> Result<(), Error> { let mut args = std::env::args(); match (args.nth(1), args.nth(2)) { (_, Some(_)) => return Err(Error::TooManyArguments(args.len() - 1)), - (Some(arg), _) if arg == "--version" => println!("kibi, v{}", env!("CARGO_PKG_VERSION")), + (Some(arg), _) if arg == "--version" => println!(concat!("kibi, v", env!("CARGO_PKG_VERSION"))), (file_name, None) => Editor::new(Config::load()?)?.run(file_name)?, } Ok(())