Implement std::fmt::Debug for all public types
This commit is contained in:
		
							
								
								
									
										11
									
								
								src/body.rs
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/body.rs
									
									
									
									
									
								
							| @@ -1,7 +1,9 @@ | ||||
| use std::io::Read; | ||||
| use std::fs::File; | ||||
| use std::fmt; | ||||
|  | ||||
| /// Body type for a request. | ||||
| #[derive(Debug)] | ||||
| pub struct Body { | ||||
|     reader: Kind, | ||||
| } | ||||
| @@ -71,6 +73,15 @@ impl From<File> for Body { | ||||
|     } | ||||
| } | ||||
|  | ||||
| impl fmt::Debug for Kind { | ||||
|     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { | ||||
|         match self { | ||||
|             &Kind::Reader(_, ref v) => f.debug_tuple("Kind::Reader").field(&"_").field(v).finish(), | ||||
|             &Kind::Bytes(ref v) => f.debug_tuple("Kind::Bytes").field(v).finish(), | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
| // Wraps a `std::io::Write`. | ||||
| //pub struct Pipe(Kind); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user