mirror of
				https://github.com/TeamPiped/piped-proxy.git
				synced 2024-08-14 23:50:45 +00:00 
			
		
		
		
	Simplify if unwrapping.
This commit is contained in:
		
							parent
							
								
									fa345b493b
								
							
						
					
					
						commit
						8755b0a76e
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -157,10 +157,7 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let content_type = resp.headers().get("content-type");
 | 
					    if let Some(content_type) = resp.headers().get("content-type") {
 | 
				
			||||||
 | 
					 | 
				
			||||||
    if content_type.is_some() {
 | 
					 | 
				
			||||||
        let content_type = content_type.unwrap();
 | 
					 | 
				
			||||||
        if content_type == "image/jpeg" {
 | 
					        if content_type == "image/jpeg" {
 | 
				
			||||||
            let resp_bytes = resp.bytes().await.unwrap();
 | 
					            let resp_bytes = resp.bytes().await.unwrap();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue