refactor(error): remove deprecated 'Error::description' method (#2092)

This commit is contained in:
danieleades
2019-12-30 17:55:08 +00:00
committed by Sean McArthur
parent fb90d30c02
commit 0f13719873
3 changed files with 27 additions and 35 deletions

View File

@@ -371,15 +371,11 @@ struct IncompleteBody;
impl fmt::Display for IncompleteBody {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.write_str(self.description())
write!(f, "end of file before message length reached")
}
}
impl StdError for IncompleteBody {
fn description(&self) -> &str {
"end of file before message length reached"
}
}
impl StdError for IncompleteBody {}
#[cfg(test)]
mod tests {