aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-06-14 03:55:56 -0600
committerbors-servo <metajack+bors@gmail.com>2015-06-14 03:55:56 -0600
commitdb2eb36e19581eee83247160bbb03e2a671d0479 (patch)
treeabfa2d7411a0f95a2c3a610c7c2417678b79b121 /components/script
parentbedfa74b1f66a87dac00c46ac6560fa012f033d9 (diff)
parentb49bd796253ea6b966e7ac44f24e45929de03f7a (diff)
downloadservo-db2eb36e19581eee83247160bbb03e2a671d0479.tar.gz
servo-db2eb36e19581eee83247160bbb03e2a671d0479.zip
Auto merge of #6325 - Ms2ger:from_str, r=nox
The former appears to be preferred. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6325) <!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/xmlhttprequest.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 5044feae3b7..5a4992a0061 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -56,7 +56,6 @@ use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::cell::{RefCell, Cell};
use std::default::Default;
-use std::str::FromStr;
use std::sync::{Mutex, Arc};
use std::sync::mpsc::{channel, Sender, TryRecvError};
use std::thread::sleep_ms;
@@ -634,7 +633,7 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> {
// https://xhr.spec.whatwg.org/#the-getresponseheader()-method
fn GetResponseHeader(self, name: ByteString) -> Option<ByteString> {
self.filter_response_headers().iter().find(|h| {
- name.eq_ignore_case(&FromStr::from_str(h.name()).unwrap())
+ name.eq_ignore_case(&h.name().parse().unwrap())
}).map(|h| {
ByteString::new(h.value_string().into_bytes())
})