fix(rustup): Remove uses of the obsolete &a[] syntax

This commit is contained in:
Renato Zannon
2015-02-21 03:31:32 -02:00
committed by Sean McArthur
parent 234fcdc3a2
commit 039e984f68
21 changed files with 47 additions and 47 deletions

View File

@@ -395,7 +395,7 @@ pub fn read_method<R: Reader>(stream: &mut R) -> HttpResult<method::Method> {
debug!("maybe_method = {:?}", maybe_method);
match (maybe_method, &buf[]) {
match (maybe_method, &buf[..]) {
(Some(method), _) => Ok(method),
(None, ext) => {
// We already checked that the buffer is ASCII
@@ -664,7 +664,7 @@ pub fn read_status<R: Reader>(stream: &mut R) -> HttpResult<RawStatus> {
}
}
let reason = match str::from_utf8(&buf[]) {
let reason = match str::from_utf8(&buf[..]) {
Ok(s) => s.trim(),
Err(_) => return Err(HttpStatusError)
};