From 2b14658f61900ec7bde8d9f7290589960cf10733 Mon Sep 17 00:00:00 2001 From: Marlon Baeten Date: Fri, 23 Jun 2023 11:58:25 +0200 Subject: [PATCH] Code style en textual changes --- backend/src/mail_server.rs | 7 ++----- backend/src/main.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/backend/src/mail_server.rs b/backend/src/mail_server.rs index 4e3d3dd..0cf0d91 100644 --- a/backend/src/mail_server.rs +++ b/backend/src/mail_server.rs @@ -57,8 +57,8 @@ impl MailHandler { impl mailin::Handler for MailHandler { fn helo(&mut self, _ip: std::net::IpAddr, _domain: &str) -> mailin::Response { - mailin::response::OK // NOTE that response is more as just '250 OK' + mailin::response::OK } fn mail(&mut self, _ip: std::net::IpAddr, _domain: &str, from: &str) -> mailin::Response { @@ -66,10 +66,7 @@ impl mailin::Handler for MailHandler { // Remote end told us about itself, time to tell more about our self. mailin::response::Response::custom( 250, - format!( - "Pleased to meet you! By the way, this is version {}", - VERSION_BE, - ), + format!("Pleased to meet you! This is Mailcrab version {VERSION_BE}",), ) } diff --git a/backend/src/main.rs b/backend/src/main.rs index 163e483..8b22e9a 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -24,7 +24,7 @@ mod mail_server; mod types; mod web_server; -pub const VERSION_BE: &'static str = env!("CARGO_PKG_VERSION"); +pub const VERSION_BE: &str = env!("CARGO_PKG_VERSION"); // Please note that above line of code will yield an error // if the environment variable isn't defined, // for example if you execute rustc directly without cargo.