fix(rustup): update FromStr
Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							c983ebf3ce
						
					
				
				
					commit
					742081c8cf
				
			| @@ -37,14 +37,15 @@ impl fmt::Display for Encoding { | ||||
| } | ||||
|  | ||||
| impl str::FromStr for Encoding { | ||||
|     fn from_str(s: &str) -> Option<Encoding> { | ||||
|     type Err = (); | ||||
|     fn from_str(s: &str) -> Result<Encoding, ()> { | ||||
|         match s { | ||||
|             "chunked" => Some(Chunked), | ||||
|             "deflate" => Some(Deflate), | ||||
|             "gzip" => Some(Gzip), | ||||
|             "compress" => Some(Compress), | ||||
|             "identity" => Some(Identity), | ||||
|             _ => Some(EncodingExt(s.to_string())) | ||||
|             "chunked" => Ok(Chunked), | ||||
|             "deflate" => Ok(Deflate), | ||||
|             "gzip" => Ok(Gzip), | ||||
|             "compress" => Ok(Compress), | ||||
|             "identity" => Ok(Identity), | ||||
|             _ => Ok(EncodingExt(s.to_string())) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user