fix(rustup): Remove uses of the obsolete &a[] syntax
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							234fcdc3a2
						
					
				
				
					commit
					039e984f68
				
			| @@ -197,7 +197,7 @@ impl<'a, U: IntoUrl, C: NetworkConnector> RequestBuilder<'a, U, C> { | ||||
|                 // punching borrowck here | ||||
|                 let loc = match res.headers.get::<Location>() { | ||||
|                     Some(&Location(ref loc)) => { | ||||
|                         Some(UrlParser::new().base_url(&url).parse(&loc[])) | ||||
|                         Some(UrlParser::new().base_url(&url).parse(&loc[..])) | ||||
|                     } | ||||
|                     None => { | ||||
|                         debug!("no Location header"); | ||||
| @@ -394,7 +394,7 @@ mod tests { | ||||
|     #[test] | ||||
|     fn test_redirect_followif() { | ||||
|         fn follow_if(url: &Url) -> bool { | ||||
|             !url.serialize()[].contains("127.0.0.3") | ||||
|             !url.serialize().contains("127.0.0.3") | ||||
|         } | ||||
|         let mut client = Client::with_connector(MockRedirectPolicy); | ||||
|         client.set_redirect_policy(RedirectPolicy::FollowIf(follow_if)); | ||||
|   | ||||
| @@ -77,7 +77,7 @@ impl Request<Fresh> { | ||||
|         //TODO: this needs a test | ||||
|         if let Some(ref q) = self.url.query { | ||||
|             uri.push('?'); | ||||
|             uri.push_str(&q[]); | ||||
|             uri.push_str(&q[..]); | ||||
|         } | ||||
|  | ||||
|         debug!("writing head: {:?} {:?} {:?}", self.method, uri, self.version); | ||||
| @@ -185,7 +185,7 @@ mod tests { | ||||
|         let stream = *req.body.end().unwrap() | ||||
|             .into_inner().downcast::<MockStream>().ok().unwrap(); | ||||
|         let bytes = stream.write.into_inner(); | ||||
|         let s = from_utf8(&bytes[]).unwrap(); | ||||
|         let s = from_utf8(&bytes[..]).unwrap(); | ||||
|         assert!(!s.contains("Content-Length:")); | ||||
|         assert!(!s.contains("Transfer-Encoding:")); | ||||
|     } | ||||
| @@ -199,7 +199,7 @@ mod tests { | ||||
|         let stream = *req.body.end().unwrap() | ||||
|             .into_inner().downcast::<MockStream>().ok().unwrap(); | ||||
|         let bytes = stream.write.into_inner(); | ||||
|         let s = from_utf8(&bytes[]).unwrap(); | ||||
|         let s = from_utf8(&bytes[..]).unwrap(); | ||||
|         assert!(!s.contains("Content-Length:")); | ||||
|         assert!(!s.contains("Transfer-Encoding:")); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user