Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 42 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/smtp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Connection {
}

/// Handle an incoming connection
pub fn handle(reader: &mut BufRead, writer: &mut Write) -> Result<Connection, Error> {
pub fn handle(reader: &mut dyn BufRead, writer: &mut dyn Write) -> Result<Connection, Error> {
let mut result = Connection::new();

writeln!(writer, "{}", MSG_READY)?;
Expand All @@ -80,7 +80,7 @@ impl Connection {
let mut line = String::new();
reader.read_line(&mut line)?;
// read_line will leave trailing newlines which must be removed
match result.feed_line(line.trim_right_matches(|c: char| c == '\n' || c == '\r')) {
match result.feed_line(line.trim_end_matches(|c: char| c == '\n' || c == '\r')) {
Ok("") => {}
Ok(s) => {
writeln!(writer, "{}", s)?;
Expand Down