Remove some more unnecessary let bindings

This commit is contained in:
David Zbarsky 2015-07-07 05:32:53 -04:00
parent 2947d78e4e
commit bc1eb97671
11 changed files with 29 additions and 84 deletions

View file

@ -623,9 +623,7 @@ impl<'a> XMLHttpRequestMethods for &'a XMLHttpRequest {
// https://xhr.spec.whatwg.org/#the-statustext-attribute
fn StatusText(self) -> ByteString {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let status_text = self.status_text.borrow();
status_text.clone()
self.status_text.borrow().clone()
}
// https://xhr.spec.whatwg.org/#the-getresponseheader()-method
@ -1031,11 +1029,9 @@ impl<'a> PrivateXMLHttpRequestHelpers for &'a XMLHttpRequest {
}
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let response = self.response.borrow();
// According to Simon, decode() should never return an error, so unwrap()ing
// the result should be fine. XXXManishearth have a closer look at this later
encoding.decode(&response, DecoderTrap::Replace).unwrap().to_owned()
encoding.decode(&self.response.borrow(), DecoderTrap::Replace).unwrap().to_owned()
}
fn filter_response_headers(self) -> Headers {
// https://fetch.spec.whatwg.org/#concept-response-header-list