mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
cargo: Bump rustc to 1.89 (#36818)
Update Rustc to 1.89. Reviewable by commit. Leftover work: - #37330 - #38777 --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
8587536755
commit
3225d19907
126 changed files with 408 additions and 610 deletions
|
@ -285,7 +285,7 @@ impl Stream for BodyStream {
|
|||
return Poll::Ready(None);
|
||||
}
|
||||
}
|
||||
Poll::Ready(Some(Err(io::Error::new(io::ErrorKind::Other, err))))
|
||||
Poll::Ready(Some(Err(io::Error::other(err))))
|
||||
},
|
||||
None => Poll::Ready(None),
|
||||
}
|
||||
|
|
|
@ -832,7 +832,7 @@ fn create_about_memory(url: ServoUrl, timing_type: ResourceTimingType) -> Respon
|
|||
|
||||
/// Handle a request from the user interface to ignore validation errors for a certificate.
|
||||
fn handle_allowcert_request(request: &mut Request, context: &FetchContext) -> io::Result<()> {
|
||||
let error = |string| Err(io::Error::new(io::ErrorKind::Other, string));
|
||||
let error = |string| Err(io::Error::other(string));
|
||||
|
||||
let body = match request.body.as_mut() {
|
||||
Some(body) => body,
|
||||
|
|
|
@ -49,7 +49,7 @@ pub fn parse_hostsfile(hostsfile_content: &str) -> HashMap<String, IpAddr> {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn replace_host(host: &str) -> Cow<str> {
|
||||
pub fn replace_host(host: &str) -> Cow<'_, str> {
|
||||
HOST_TABLE
|
||||
.lock()
|
||||
.unwrap()
|
||||
|
|
|
@ -2017,7 +2017,7 @@ async fn http_network_fetch(
|
|||
.iter()
|
||||
.map(|header_value| header_value.to_str().unwrap_or(""))
|
||||
.collect();
|
||||
let wildcard_present = header_strings.iter().any(|header_str| *header_str == "*");
|
||||
let wildcard_present = header_strings.contains(&"*");
|
||||
// The spec: https://www.w3.org/TR/resource-timing-2/#sec-timing-allow-origin
|
||||
// says that a header string is either an origin or a wildcard so we can just do a straight
|
||||
// check against the document origin
|
||||
|
|
|
@ -12,6 +12,7 @@ pub enum Column {
|
|||
Version,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Model {
|
||||
pub name: String,
|
||||
|
|
|
@ -14,6 +14,7 @@ pub enum Column {
|
|||
MultiEntryIndex,
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Model {
|
||||
pub id: i32,
|
||||
|
|
|
@ -48,6 +48,8 @@ use crate::fetch::methods::{
|
|||
};
|
||||
use crate::hosts::replace_host;
|
||||
use crate::http_loader::HttpState;
|
||||
|
||||
#[allow(clippy::result_large_err)]
|
||||
/// Create a tungstenite Request object for the initial HTTP request.
|
||||
/// This request contains `Origin`, `Sec-WebSocket-Protocol`, `Authorization`,
|
||||
/// and `Cookie` headers as appropriate.
|
||||
|
@ -105,6 +107,7 @@ fn create_request(
|
|||
Ok(request)
|
||||
}
|
||||
|
||||
#[allow(clippy::result_large_err)]
|
||||
/// Process an HTTP response resulting from a WS handshake.
|
||||
/// This ensures that any `Cookie` or HSTS headers are recognized.
|
||||
/// Returns an error if the protocol selected by the handshake doesn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue