Skip to content

Commit

Permalink
Code style en textual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbaeten committed Jun 23, 2023
1 parent 7866b68 commit 2b14658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions backend/src/mail_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,16 @@ 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 {
self.envelope_from = from.to_string();
// 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}",),
)
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2b14658

Please sign in to comment.