mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
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 -->
This commit is contained in:
commit
db2eb36e19
5 changed files with 10 additions and 17 deletions
|
@ -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())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue