Merge pull request #146 from jaemk/doc_tests
remove network call from doc test
This commit is contained in:
		
							
								
								
									
										19
									
								
								src/lib.rs
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								src/lib.rs
									
									
									
									
									
								
							| @@ -164,30 +164,15 @@ mod response; | |||||||
| /// # Examples | /// # Examples | ||||||
| /// | /// | ||||||
| /// ```rust | /// ```rust | ||||||
| /// # extern crate reqwest; |  | ||||||
| /// # #[macro_use] extern crate error_chain; |  | ||||||
| /// # |  | ||||||
| /// use std::io::Read; | /// use std::io::Read; | ||||||
| /// | /// | ||||||
| /// # error_chain! { | /// # fn run() -> Result<(), Box<::std::error::Error>> { | ||||||
| /// #     foreign_links { |  | ||||||
| /// #         Reqwest(reqwest::Error); |  | ||||||
| /// #         Io(std::io::Error); |  | ||||||
| /// #     } |  | ||||||
| /// # } |  | ||||||
| /// # |  | ||||||
| /// # fn run() -> Result<()> { |  | ||||||
| /// let mut result = String::new(); | /// let mut result = String::new(); | ||||||
| /// reqwest::get("https://www.rust-lang.org")? | /// reqwest::get("https://www.rust-lang.org")? | ||||||
| ///     .read_to_string(&mut result)?; | ///     .read_to_string(&mut result)?; | ||||||
| /// # Ok(()) | /// # Ok(()) | ||||||
| /// # } | /// # } | ||||||
| /// # | /// # fn main() { } | ||||||
| /// # fn main() { |  | ||||||
| /// #    if let Err(error) = run() { |  | ||||||
| /// #        println!("Error: {:?}", error); |  | ||||||
| /// #    } |  | ||||||
| /// # } |  | ||||||
| /// ``` | /// ``` | ||||||
| /// | /// | ||||||
| /// # Errors | /// # Errors | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user