feat(client): Response.status() now returns a StatusCode
Previously, it would return `&StatusCode`. Returning a reference was actually bigger than the enum itself, and prevented using `Into` on the return result directly. BREAKING CHANGE: If you were explicitly checking the status, such as with an equality comparison, you will need to use the value instead of a reference.
This commit is contained in:
@@ -550,9 +550,9 @@ impl Default for StatusCode {
|
||||
}
|
||||
}
|
||||
|
||||
impl Into<u16> for StatusCode {
|
||||
fn into(self) -> u16 {
|
||||
self.to_u16()
|
||||
impl From<StatusCode> for u16 {
|
||||
fn from(code: StatusCode) -> u16 {
|
||||
code.to_u16()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user