Replace use of assert_eq with assert
Reported by clippy.
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							1be9c34f01
						
					
				
				
					commit
					4be5ec7ffd
				
			| @@ -782,7 +782,7 @@ mod tests { | |||||||
|             req.headers()["authorization"], |             req.headers()["authorization"], | ||||||
|             "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" |             "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" | ||||||
|         ); |         ); | ||||||
|         assert_eq!(req.headers()["authorization"].is_sensitive(), true); |         assert!(req.headers()["authorization"].is_sensitive()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
| @@ -798,7 +798,7 @@ mod tests { | |||||||
|  |  | ||||||
|         assert_eq!(req.url().as_str(), "https://localhost/"); |         assert_eq!(req.url().as_str(), "https://localhost/"); | ||||||
|         assert_eq!(req.headers()["authorization"], "Bearer Hold my bear"); |         assert_eq!(req.headers()["authorization"], "Bearer Hold my bear"); | ||||||
|         assert_eq!(req.headers()["authorization"].is_sensitive(), true); |         assert!(req.headers()["authorization"].is_sensitive()); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
| @@ -810,7 +810,7 @@ mod tests { | |||||||
|             .body("test test test") |             .body("test test test") | ||||||
|             .unwrap(); |             .unwrap(); | ||||||
|         let req: Request = Request::try_from(http_request).unwrap(); |         let req: Request = Request::try_from(http_request).unwrap(); | ||||||
|         assert_eq!(req.body().is_none(), false); |         assert!(req.body().is_some()); | ||||||
|         let test_data = b"test test test"; |         let test_data = b"test test test"; | ||||||
|         assert_eq!(req.body().unwrap().as_bytes(), Some(&test_data[..])); |         assert_eq!(req.body().unwrap().as_bytes(), Some(&test_data[..])); | ||||||
|         let headers = req.headers(); |         let headers = req.headers(); | ||||||
| @@ -829,7 +829,7 @@ mod tests { | |||||||
|             .body("test test test") |             .body("test test test") | ||||||
|             .unwrap(); |             .unwrap(); | ||||||
|         let req: Request = Request::try_from(http_request).unwrap(); |         let req: Request = Request::try_from(http_request).unwrap(); | ||||||
|         assert_eq!(req.body().is_none(), false); |         assert!(req.body().is_some()); | ||||||
|         let test_data = b"test test test"; |         let test_data = b"test test test"; | ||||||
|         assert_eq!(req.body().unwrap().as_bytes(), Some(&test_data[..])); |         assert_eq!(req.body().unwrap().as_bytes(), Some(&test_data[..])); | ||||||
|         let headers = req.headers(); |         let headers = req.headers(); | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								src/proxy.rs
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/proxy.rs
									
									
									
									
									
								
							| @@ -1055,8 +1055,8 @@ mod tests { | |||||||
|         // Let other threads run now |         // Let other threads run now | ||||||
|         drop(_lock); |         drop(_lock); | ||||||
|  |  | ||||||
|         assert_eq!(baseline_proxies.contains_key("http"), false); |         assert!(!baseline_proxies.contains_key("http")); | ||||||
|         assert_eq!(invalid_proxies.contains_key("http"), false); |         assert!(!invalid_proxies.contains_key("http")); | ||||||
|  |  | ||||||
|         let p = &valid_proxies["http"]; |         let p = &valid_proxies["http"]; | ||||||
|         assert_eq!(p.scheme(), "http"); |         assert_eq!(p.scheme(), "http"); | ||||||
| @@ -1298,7 +1298,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(http_proxy_with_auth.maybe_has_http_auth(), true); |         assert!(http_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             Some(HeaderValue::from_static("auth1")) |             Some(HeaderValue::from_static("auth1")) | ||||||
| @@ -1311,7 +1311,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(http_proxy_without_auth.maybe_has_http_auth(), false); |         assert!(!http_proxy_without_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             http_proxy_without_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             http_proxy_without_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             None |             None | ||||||
| @@ -1324,7 +1324,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(https_proxy_with_auth.maybe_has_http_auth(), false); |         assert!(!https_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             None |             None | ||||||
| @@ -1337,7 +1337,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(all_http_proxy_with_auth.maybe_has_http_auth(), true); |         assert!(all_http_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             all_http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             all_http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             Some(HeaderValue::from_static("auth3")) |             Some(HeaderValue::from_static("auth3")) | ||||||
| @@ -1350,7 +1350,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(all_https_proxy_with_auth.maybe_has_http_auth(), false); |         assert!(!all_https_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             all_https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             all_https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             None |             None | ||||||
| @@ -1363,7 +1363,7 @@ mod tests { | |||||||
|             }), |             }), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(all_https_proxy_without_auth.maybe_has_http_auth(), false); |         assert!(!all_https_proxy_without_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             all_https_proxy_without_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             all_https_proxy_without_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             None |             None | ||||||
| @@ -1383,7 +1383,7 @@ mod tests { | |||||||
|             })), |             })), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(system_http_proxy_with_auth.maybe_has_http_auth(), true); |         assert!(system_http_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             system_http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             system_http_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             Some(HeaderValue::from_static("auth5")) |             Some(HeaderValue::from_static("auth5")) | ||||||
| @@ -1403,7 +1403,7 @@ mod tests { | |||||||
|             })), |             })), | ||||||
|             no_proxy: None, |             no_proxy: None, | ||||||
|         }; |         }; | ||||||
|         assert_eq!(system_https_proxy_with_auth.maybe_has_http_auth(), false); |         assert!(!system_https_proxy_with_auth.maybe_has_http_auth()); | ||||||
|         assert_eq!( |         assert_eq!( | ||||||
|             system_https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), |             system_https_proxy_with_auth.http_basic_auth(&Uri::from_static("http://example.com")), | ||||||
|             None |             None | ||||||
|   | |||||||
| @@ -286,7 +286,7 @@ async fn test_allowed_methods() { | |||||||
|         .send() |         .send() | ||||||
|         .await; |         .await; | ||||||
|  |  | ||||||
|     assert_eq!(resp.is_err(), false); |     assert!(resp.is_ok()); | ||||||
|  |  | ||||||
|     let resp = reqwest::Client::builder() |     let resp = reqwest::Client::builder() | ||||||
|         .https_only(true) |         .https_only(true) | ||||||
| @@ -296,5 +296,5 @@ async fn test_allowed_methods() { | |||||||
|         .send() |         .send() | ||||||
|         .await; |         .await; | ||||||
|  |  | ||||||
|     assert_eq!(resp.is_err(), true); |     assert!(resp.is_err()); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user