mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add plugins for compositing and net crates #7699
Changed to_string calls to to_owned calls where was a need.
This commit is contained in:
parent
44de9173cc
commit
88815d21ba
18 changed files with 43 additions and 31 deletions
|
@ -167,7 +167,7 @@ impl CORSCache for BasicCORSCache {
|
|||
None => {
|
||||
self.insert(CORSCacheEntry::new(request.origin, request.destination, new_max_age,
|
||||
request.credentials,
|
||||
HeaderOrMethod::HeaderData(header_name.to_string())));
|
||||
HeaderOrMethod::HeaderData(header_name.to_owned())));
|
||||
false
|
||||
}
|
||||
}
|
||||
|
@ -228,13 +228,13 @@ impl CORSCache for CORSCacheSender {
|
|||
|
||||
fn match_header(&mut self, request: CacheRequestDetails, header_name: &str) -> bool {
|
||||
let (tx, rx) = channel();
|
||||
self.send(CORSCacheTaskMsg::MatchHeader(request, header_name.to_string(), tx));
|
||||
self.send(CORSCacheTaskMsg::MatchHeader(request, header_name.to_owned(), tx));
|
||||
rx.recv().unwrap_or(false)
|
||||
}
|
||||
|
||||
fn match_header_and_update(&mut self, request: CacheRequestDetails, header_name: &str, new_max_age: u32) -> bool {
|
||||
let (tx, rx) = channel();
|
||||
self.send(CORSCacheTaskMsg::MatchHeaderUpdate(request, header_name.to_string(), new_max_age, tx));
|
||||
self.send(CORSCacheTaskMsg::MatchHeaderUpdate(request, header_name.to_owned(), new_max_age, tx));
|
||||
rx.recv().unwrap_or(false)
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ impl Request {
|
|||
=> vec![qitem(Mime(TopLevel::Image, SubLevel::Png, vec![])),
|
||||
// FIXME: This should properly generate a MimeType that has a
|
||||
// SubLevel of svg+xml (https://github.com/hyperium/mime.rs/issues/22)
|
||||
qitem(Mime(TopLevel::Image, SubLevel::Ext("svg+xml".to_string()), vec![])),
|
||||
qitem(Mime(TopLevel::Image, SubLevel::Ext("svg+xml".to_owned()), vec![])),
|
||||
QualityItem::new(Mime(TopLevel::Image, SubLevel::Star, vec![]), q(0.8)),
|
||||
QualityItem::new(Mime(TopLevel::Star, SubLevel::Star, vec![]), q(0.5))],
|
||||
Context::Form | Context::Frame | Context::Hyperlink |
|
||||
|
@ -164,14 +164,14 @@ impl Request {
|
|||
=> vec![qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
|
||||
// FIXME: This should properly generate a MimeType that has a
|
||||
// SubLevel of xhtml+xml (https://github.com/hyperium/mime.rs/issues/22)
|
||||
qitem(Mime(TopLevel::Application, SubLevel::Ext("xhtml+xml".to_string()), vec![])),
|
||||
qitem(Mime(TopLevel::Application, SubLevel::Ext("xhtml+xml".to_owned()), vec![])),
|
||||
QualityItem::new(Mime(TopLevel::Application, SubLevel::Xml, vec![]), q(0.9)),
|
||||
QualityItem::new(Mime(TopLevel::Star, SubLevel::Star, vec![]), q(0.8))],
|
||||
Context::Internal if self.context_frame_type != ContextFrameType::ContextNone
|
||||
=> vec![qitem(Mime(TopLevel::Text, SubLevel::Html, vec![])),
|
||||
// FIXME: This should properly generate a MimeType that has a
|
||||
// SubLevel of xhtml+xml (https://github.com/hyperium/mime.rs/issues/22)
|
||||
qitem(Mime(TopLevel::Application, SubLevel::Ext("xhtml+xml".to_string()), vec![])),
|
||||
qitem(Mime(TopLevel::Application, SubLevel::Ext("xhtml+xml".to_owned()), vec![])),
|
||||
QualityItem::new(Mime(TopLevel::Application, SubLevel::Xml, vec![]), q(0.9)),
|
||||
QualityItem::new(Mime(TopLevel::Star, SubLevel::Star, vec![]), q(0.8))],
|
||||
Context::Style
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue