mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
add rustfmt config
This commit is contained in:
131
src/lib.rs
131
src/lib.rs
@@ -64,17 +64,17 @@
|
||||
#![cfg_attr(actix_nightly, feature(
|
||||
specialization, // for impl ErrorResponse for std::error::Error
|
||||
))]
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(
|
||||
decimal_literal_representation,suspicious_arithmetic_impl,))]
|
||||
#![cfg_attr(feature = "cargo-clippy",
|
||||
allow(decimal_literal_representation, suspicious_arithmetic_impl))]
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate time;
|
||||
extern crate base64;
|
||||
extern crate bytes;
|
||||
extern crate byteorder;
|
||||
extern crate sha1;
|
||||
extern crate bytes;
|
||||
extern crate regex;
|
||||
extern crate sha1;
|
||||
extern crate time;
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
#[macro_use]
|
||||
@@ -83,46 +83,49 @@ extern crate failure;
|
||||
extern crate lazy_static;
|
||||
#[macro_use]
|
||||
extern crate futures;
|
||||
extern crate futures_cpupool;
|
||||
extern crate tokio_io;
|
||||
extern crate tokio_core;
|
||||
extern crate mio;
|
||||
extern crate net2;
|
||||
extern crate cookie;
|
||||
extern crate futures_cpupool;
|
||||
extern crate http as modhttp;
|
||||
extern crate httparse;
|
||||
extern crate http_range;
|
||||
extern crate httparse;
|
||||
extern crate language_tags;
|
||||
extern crate libc;
|
||||
extern crate mime;
|
||||
extern crate mime_guess;
|
||||
extern crate language_tags;
|
||||
extern crate mio;
|
||||
extern crate net2;
|
||||
extern crate rand;
|
||||
extern crate tokio_core;
|
||||
extern crate tokio_io;
|
||||
extern crate url;
|
||||
extern crate libc;
|
||||
#[macro_use] extern crate serde;
|
||||
extern crate serde_json;
|
||||
extern crate serde_urlencoded;
|
||||
extern crate flate2;
|
||||
#[cfg(feature="brotli")]
|
||||
#[macro_use]
|
||||
extern crate serde;
|
||||
#[cfg(feature = "brotli")]
|
||||
extern crate brotli2;
|
||||
extern crate encoding;
|
||||
extern crate percent_encoding;
|
||||
extern crate smallvec;
|
||||
extern crate num_cpus;
|
||||
extern crate flate2;
|
||||
extern crate h2 as http2;
|
||||
extern crate num_cpus;
|
||||
extern crate percent_encoding;
|
||||
extern crate serde_json;
|
||||
extern crate serde_urlencoded;
|
||||
extern crate smallvec;
|
||||
extern crate trust_dns_resolver;
|
||||
#[macro_use] extern crate actix;
|
||||
#[macro_use]
|
||||
extern crate actix;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_use] extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
|
||||
#[cfg(feature="tls")]
|
||||
#[cfg(feature = "tls")]
|
||||
extern crate native_tls;
|
||||
#[cfg(feature="tls")]
|
||||
#[cfg(feature = "tls")]
|
||||
extern crate tokio_tls;
|
||||
|
||||
#[cfg(feature="openssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
extern crate openssl;
|
||||
#[cfg(feature="openssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
extern crate tokio_openssl;
|
||||
|
||||
mod application;
|
||||
@@ -138,33 +141,33 @@ mod httprequest;
|
||||
mod httpresponse;
|
||||
mod info;
|
||||
mod json;
|
||||
mod route;
|
||||
mod router;
|
||||
mod resource;
|
||||
mod param;
|
||||
mod payload;
|
||||
mod pipeline;
|
||||
mod resource;
|
||||
mod route;
|
||||
mod router;
|
||||
mod with;
|
||||
|
||||
pub mod client;
|
||||
pub mod fs;
|
||||
pub mod ws;
|
||||
pub mod error;
|
||||
pub mod multipart;
|
||||
pub mod fs;
|
||||
pub mod middleware;
|
||||
pub mod multipart;
|
||||
pub mod pred;
|
||||
pub mod test;
|
||||
pub mod server;
|
||||
pub use extractor::{Path, Form, Query};
|
||||
pub use error::{Error, Result, ResponseError};
|
||||
pub use body::{Body, Binary};
|
||||
pub use json::Json;
|
||||
pub mod test;
|
||||
pub mod ws;
|
||||
pub use application::App;
|
||||
pub use body::{Binary, Body};
|
||||
pub use context::HttpContext;
|
||||
pub use error::{Error, ResponseError, Result};
|
||||
pub use extractor::{Form, Path, Query};
|
||||
pub use handler::{AsyncResponder, Either, FromRequest, FutureResponse, Responder, State};
|
||||
pub use httpmessage::HttpMessage;
|
||||
pub use httprequest::HttpRequest;
|
||||
pub use httpresponse::HttpResponse;
|
||||
pub use handler::{Either, Responder, AsyncResponder, FromRequest, FutureResponse, State};
|
||||
pub use context::HttpContext;
|
||||
pub use json::Json;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod httpcodes;
|
||||
@@ -173,39 +176,39 @@ pub mod httpcodes;
|
||||
#[allow(deprecated)]
|
||||
pub use application::Application;
|
||||
|
||||
#[cfg(feature="openssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
pub(crate) const HAS_OPENSSL: bool = true;
|
||||
#[cfg(not(feature="openssl"))]
|
||||
#[cfg(not(feature = "openssl"))]
|
||||
pub(crate) const HAS_OPENSSL: bool = false;
|
||||
|
||||
#[cfg(feature="tls")]
|
||||
#[cfg(feature = "tls")]
|
||||
pub(crate) const HAS_TLS: bool = true;
|
||||
#[cfg(not(feature="tls"))]
|
||||
#[cfg(not(feature = "tls"))]
|
||||
pub(crate) const HAS_TLS: bool = false;
|
||||
|
||||
pub mod dev {
|
||||
//! The `actix-web` prelude for library developers
|
||||
//!
|
||||
//! The purpose of this module is to alleviate imports of many common actix traits
|
||||
//! by adding a glob import to the top of actix heavy modules:
|
||||
//!
|
||||
//! ```
|
||||
//! # #![allow(unused_imports)]
|
||||
//! use actix_web::dev::*;
|
||||
//! ```
|
||||
//! The `actix-web` prelude for library developers
|
||||
//!
|
||||
//! The purpose of this module is to alleviate imports of many common actix
|
||||
//! traits by adding a glob import to the top of actix heavy modules:
|
||||
//!
|
||||
//! ```
|
||||
//! # #![allow(unused_imports)]
|
||||
//! use actix_web::dev::*;
|
||||
//! ```
|
||||
|
||||
pub use body::BodyStream;
|
||||
pub use context::Drain;
|
||||
pub use json::{JsonBody, JsonConfig};
|
||||
pub use info::ConnectionInfo;
|
||||
pub use handler::{Handler, Reply};
|
||||
pub use extractor::{FormConfig, PayloadConfig};
|
||||
pub use route::Route;
|
||||
pub use router::{Router, Resource, ResourceType};
|
||||
pub use resource::ResourceHandler;
|
||||
pub use param::{FromParam, Params};
|
||||
pub use httpmessage::{UrlEncoded, MessageBody};
|
||||
pub use handler::{Handler, Reply};
|
||||
pub use httpmessage::{MessageBody, UrlEncoded};
|
||||
pub use httpresponse::HttpResponseBuilder;
|
||||
pub use info::ConnectionInfo;
|
||||
pub use json::{JsonBody, JsonConfig};
|
||||
pub use param::{FromParam, Params};
|
||||
pub use resource::ResourceHandler;
|
||||
pub use route::Route;
|
||||
pub use router::{Resource, ResourceType, Router};
|
||||
}
|
||||
|
||||
pub mod http {
|
||||
@@ -215,15 +218,15 @@ pub mod http {
|
||||
pub use modhttp::{Method, StatusCode, Version};
|
||||
|
||||
#[doc(hidden)]
|
||||
pub use modhttp::{uri, Uri, Error, Extensions, HeaderMap, HttpTryFrom};
|
||||
pub use modhttp::{uri, Error, Extensions, HeaderMap, HttpTryFrom, Uri};
|
||||
|
||||
pub use http_range::HttpRange;
|
||||
pub use cookie::{Cookie, CookieBuilder};
|
||||
pub use http_range::HttpRange;
|
||||
|
||||
pub use helpers::NormalizePath;
|
||||
|
||||
pub mod header {
|
||||
pub use ::header::*;
|
||||
pub use header::*;
|
||||
}
|
||||
pub use header::ContentEncoding;
|
||||
pub use httpresponse::ConnectionType;
|
||||
|
Reference in New Issue
Block a user