mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
cargo fix --edition-idioms
This commit is contained in:
parent
b1fd6237d1
commit
2012be4a8b
203 changed files with 665 additions and 1281 deletions
|
@ -1,3 +1,5 @@
|
|||
cargo-features = ["rename-dependency"]
|
||||
|
||||
[package]
|
||||
name = "net"
|
||||
version = "0.0.1"
|
||||
|
@ -17,7 +19,7 @@ doctest = false
|
|||
base64 = "0.9"
|
||||
brotli = "2.5"
|
||||
bytes = "0.4"
|
||||
cookie = "0.11"
|
||||
cookie_rs = {package = "cookie", version = "0.11"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
embedder_traits = { path = "../embedder_traits" }
|
||||
flate2 = "1"
|
||||
|
|
|
@ -161,7 +161,7 @@ pub fn create_http_client<E>(
|
|||
executor: E,
|
||||
) -> Client<Connector, WrappedBody>
|
||||
where
|
||||
E: Executor<Box<Future<Error = (), Item = ()> + Send + 'static>> + Sync + Send + 'static,
|
||||
E: Executor<Box<dyn Future<Error = (), Item = ()> + Send + 'static>> + Sync + Send + 'static,
|
||||
{
|
||||
let connector =
|
||||
HttpsConnector::with_connector(HttpConnector::new(), ssl_connector_builder).unwrap();
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
//! Implementation of cookie creation and matching as specified by
|
||||
//! http://tools.ietf.org/html/rfc6265
|
||||
|
||||
use crate::cookie_rs;
|
||||
use cookie_rs;
|
||||
use hyper_serde::{self, Serde};
|
||||
use net_traits::pub_domains::is_pub_domain;
|
||||
use net_traits::CookieSource;
|
||||
|
|
|
@ -5,16 +5,14 @@
|
|||
//! Implementation of cookie storage as specified in
|
||||
//! http://tools.ietf.org/html/rfc6265
|
||||
|
||||
use cookie_rs;
|
||||
use crate::cookie::Cookie;
|
||||
use crate::cookie_rs;
|
||||
use net_traits::pub_domains::reg_suffix;
|
||||
use net_traits::CookieSource;
|
||||
use servo_url::ServoUrl;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::HashMap;
|
||||
use time::Tm;
|
||||
|
||||
extern crate time;
|
||||
use time::{self, Tm};
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct CookieStorage {
|
||||
|
|
|
@ -41,7 +41,7 @@ lazy_static! {
|
|||
|
||||
const FILE_CHUNK_SIZE: usize = 32768; //32 KB
|
||||
|
||||
pub type Target<'a> = &'a mut (FetchTaskTarget + Send);
|
||||
pub type Target<'a> = &'a mut (dyn FetchTaskTarget + Send);
|
||||
|
||||
pub enum Data {
|
||||
Payload(Vec<u8>),
|
||||
|
|
|
@ -380,7 +380,7 @@ fn obtain_response(
|
|||
request_id: Option<&str>,
|
||||
is_xhr: bool,
|
||||
) -> Box<
|
||||
Future<
|
||||
dyn Future<
|
||||
Item = (
|
||||
HyperResponse<WrappedBody>,
|
||||
Option<ChromeToDevtoolsControlMsg>,
|
||||
|
|
|
@ -4,53 +4,18 @@
|
|||
|
||||
#![deny(unsafe_code)]
|
||||
|
||||
extern crate base64;
|
||||
extern crate brotli;
|
||||
extern crate bytes;
|
||||
extern crate cookie as cookie_rs;
|
||||
extern crate devtools_traits;
|
||||
extern crate embedder_traits;
|
||||
extern crate flate2;
|
||||
extern crate headers_core;
|
||||
extern crate headers_ext;
|
||||
extern crate http;
|
||||
extern crate hyper;
|
||||
extern crate hyper_openssl;
|
||||
extern crate hyper_serde;
|
||||
extern crate immeta;
|
||||
extern crate ipc_channel;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate malloc_size_of;
|
||||
#[macro_use]
|
||||
extern crate malloc_size_of_derive;
|
||||
#[macro_use]
|
||||
#[no_link]
|
||||
extern crate matches;
|
||||
extern crate mime;
|
||||
extern crate mime_guess;
|
||||
extern crate msg;
|
||||
extern crate net_traits;
|
||||
extern crate openssl;
|
||||
extern crate pixels;
|
||||
#[macro_use]
|
||||
extern crate profile_traits;
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate servo_allocator;
|
||||
extern crate servo_arc;
|
||||
extern crate servo_channel;
|
||||
extern crate servo_config;
|
||||
extern crate servo_url;
|
||||
extern crate time;
|
||||
extern crate tokio;
|
||||
extern crate url;
|
||||
extern crate uuid;
|
||||
extern crate webrender_api;
|
||||
extern crate ws;
|
||||
|
||||
mod blob_loader;
|
||||
pub mod connector;
|
||||
|
|
|
@ -454,7 +454,7 @@ impl MIMEChecker for BinaryOrPlaintextClassifier {
|
|||
}
|
||||
}
|
||||
struct GroupedClassifier {
|
||||
byte_matchers: Vec<Box<MIMEChecker + Send + Sync>>,
|
||||
byte_matchers: Vec<Box<dyn MIMEChecker + Send + Sync>>,
|
||||
}
|
||||
impl GroupedClassifier {
|
||||
fn image_classifer() -> GroupedClassifier {
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//! A thread that takes a URL and streams back the binary data.
|
||||
|
||||
use cookie_rs;
|
||||
use crate::connector::{create_http_client, create_ssl_connector_builder};
|
||||
use crate::cookie;
|
||||
use crate::cookie_rs;
|
||||
use crate::cookie_storage::CookieStorage;
|
||||
use crate::fetch::cors_cache::CorsCache;
|
||||
use crate::fetch::methods::{fetch, CancellationListener, FetchContext};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::cookie_rs;
|
||||
use cookie_rs;
|
||||
use net::cookie::Cookie;
|
||||
use net::cookie_storage::CookieStorage;
|
||||
use net_traits::CookieSource;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::cookie_rs::Cookie as CookiePair;
|
||||
use cookie_rs::Cookie as CookiePair;
|
||||
use crate::fetch;
|
||||
use crate::fetch_with_context;
|
||||
use crate::make_server;
|
||||
|
|
|
@ -4,32 +4,8 @@
|
|||
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate cookie as cookie_rs;
|
||||
extern crate devtools_traits;
|
||||
extern crate embedder_traits;
|
||||
extern crate flate2;
|
||||
extern crate futures;
|
||||
extern crate headers_core;
|
||||
extern crate headers_ext;
|
||||
extern crate http;
|
||||
extern crate hyper;
|
||||
extern crate hyper_serde;
|
||||
extern crate ipc_channel;
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
extern crate mime;
|
||||
extern crate msg;
|
||||
extern crate net;
|
||||
extern crate net_traits;
|
||||
extern crate openssl;
|
||||
extern crate profile_traits;
|
||||
extern crate servo_channel;
|
||||
extern crate servo_config;
|
||||
extern crate servo_url;
|
||||
extern crate time;
|
||||
extern crate tokio;
|
||||
extern crate tokio_openssl;
|
||||
extern crate url;
|
||||
|
||||
mod cookie;
|
||||
mod cookie_http_state;
|
||||
|
@ -90,7 +66,7 @@ fn create_embedder_proxy() -> EmbedderProxy {
|
|||
}
|
||||
impl EventLoopWaker for DummyEventLoopWaker {
|
||||
fn wake(&self) {}
|
||||
fn clone(&self) -> Box<EventLoopWaker + Send> {
|
||||
fn clone(&self) -> Box<dyn EventLoopWaker + Send> {
|
||||
Box::new(DummyEventLoopWaker {})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue