Auto merge of #14137 - servo:debug-response, r=frewsxcv

Implement Debug for Response.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14137)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-08 22:45:19 -06:00 committed by GitHub
commit a203a26c12

View file

@ -25,7 +25,7 @@ pub enum ResponseType {
} }
/// [Response termination reason](https://fetch.spec.whatwg.org/#concept-response-termination-reason) /// [Response termination reason](https://fetch.spec.whatwg.org/#concept-response-termination-reason)
#[derive(Clone, Copy, Deserialize, Serialize, HeapSizeOf)] #[derive(Debug, Clone, Copy, Deserialize, Serialize, HeapSizeOf)]
pub enum TerminationReason { pub enum TerminationReason {
EndUserAbort, EndUserAbort,
Fatal, Fatal,
@ -61,7 +61,7 @@ pub enum CacheState {
} }
/// [Https state](https://fetch.spec.whatwg.org/#concept-response-https-state) /// [Https state](https://fetch.spec.whatwg.org/#concept-response-https-state)
#[derive(Clone, Copy, HeapSizeOf, Deserialize, Serialize)] #[derive(Debug, Clone, Copy, HeapSizeOf, Deserialize, Serialize)]
pub enum HttpsState { pub enum HttpsState {
None, None,
Deprecated, Deprecated,
@ -75,7 +75,7 @@ pub enum ResponseMsg {
} }
/// A [Response](https://fetch.spec.whatwg.org/#concept-response) as defined by the Fetch spec /// A [Response](https://fetch.spec.whatwg.org/#concept-response) as defined by the Fetch spec
#[derive(Clone, HeapSizeOf)] #[derive(Debug, Clone, HeapSizeOf)]
pub struct Response { pub struct Response {
pub response_type: ResponseType, pub response_type: ResponseType,
pub termination_reason: Option<TerminationReason>, pub termination_reason: Option<TerminationReason>,