Remove all extern crate...
In Rust 2018 edition, it is considered unidiomatic to use "extern crate" sunthax. The proper way to do it is to replace extern crate with "use" declarations. - Also impl clippy suggestions for fn main removal in doctests - Fix unneeded box allocations and clones Signed-off-by: Damien Stanton <damien.stanton@gmail.com> Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
committed by
Adrian Catangiu
parent
a7f035b8c5
commit
eeae4ac11d
@@ -45,7 +45,6 @@
|
||||
//!
|
||||
//! ## Example for parsing an HTTP Request from a slice
|
||||
//! ```
|
||||
//! extern crate micro_http;
|
||||
//! use micro_http::{Request, Version};
|
||||
//!
|
||||
//! let http_request = Request::try_from(b"GET http://localhost/home HTTP/1.0\r\n\r\n").unwrap();
|
||||
@@ -55,7 +54,6 @@
|
||||
//!
|
||||
//! ## Example for creating an HTTP Response
|
||||
//! ```
|
||||
//! extern crate micro_http;
|
||||
//! use micro_http::{Body, MediaType, Response, StatusCode, Version};
|
||||
//!
|
||||
//! let mut response = Response::new(Version::Http10, StatusCode::OK);
|
||||
@@ -82,7 +80,6 @@
|
||||
//! ## Example for using the server
|
||||
//!
|
||||
//! ```
|
||||
//! extern crate micro_http;
|
||||
//! use micro_http::{HttpServer, Response, StatusCode};
|
||||
//!
|
||||
//! let path_to_socket = "/tmp/example.sock";
|
||||
@@ -109,9 +106,6 @@
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
extern crate libc;
|
||||
extern crate utils;
|
||||
|
||||
mod common;
|
||||
mod connection;
|
||||
mod request;
|
||||
|
||||
Reference in New Issue
Block a user