Ensure we provide a Transport::message() when we can

This commit is contained in:
Martin Algesten
2021-12-19 12:46:27 +01:00
parent 6a094db668
commit f3857eed00
7 changed files with 39 additions and 22 deletions

View File

@@ -143,7 +143,7 @@ impl Header {
let value_raw = &bytes[self.index + 1..];
if !valid_name(name_raw) || !valid_value(value_raw) {
Err(ErrorKind::BadHeader.msg(&format!("invalid header '{}'", self.line)))
Err(ErrorKind::BadHeader.msg(format!("invalid header '{}'", self.line)))
} else {
Ok(())
}