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
				
			| @@ -31,11 +31,12 @@ pub enum ConnectionOption { | ||||
| } | ||||
|  | ||||
| impl FromStr for ConnectionOption { | ||||
|     fn from_str(s: &str) -> Option<ConnectionOption> { | ||||
|     type Err = (); | ||||
|     fn from_str(s: &str) -> Result<ConnectionOption, ()> { | ||||
|         match s { | ||||
|             "keep-alive" => Some(KeepAlive), | ||||
|             "close" => Some(Close), | ||||
|             s => Some(ConnectionHeader(UniCase(s.to_string()))) | ||||
|             "keep-alive" => Ok(KeepAlive), | ||||
|             "close" => Ok(Close), | ||||
|             s => Ok(ConnectionHeader(UniCase(s.to_string()))) | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user