Skip to content

Commit

Permalink
Merge pull request #502 from http-rs/move-files-around
Browse files Browse the repository at this point in the history
Change file structure to match external exports
  • Loading branch information
yoshuawuyts authored May 15, 2020
2 parents 15272f9 + 5eec13f commit 46aa4e0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 18 deletions.
3 changes: 3 additions & 0 deletions src/fs/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod serve_dir;

pub(crate) use serve_dir::ServeDir;
File renamed without changes.
18 changes: 7 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,11 @@

mod cookies;
mod endpoint;
mod fs;
mod middleware;
mod request;
mod response;
mod route;
mod router;
mod server;
mod utils;
Expand All @@ -198,23 +200,17 @@ pub mod log;
pub mod prelude;
pub mod redirect;
pub mod security;

pub use endpoint::Endpoint;
pub use request::Request;
pub mod sse;

#[doc(inline)]
pub use http_types::{Body, Error, Status, StatusCode};

#[doc(inline)]
pub use endpoint::Endpoint;
pub use middleware::{Middleware, Next};
#[doc(inline)]
pub use request::Request;
pub use response::Response;
#[doc(inline)]
pub use server::{Route, Server};
pub use route::Route;
pub use server::Server;

#[doc(inline)]
pub use http_types as http;
pub use http_types::{self as http, Body, Error, Status, StatusCode};

/// Create a new Tide server.
///
Expand Down
2 changes: 1 addition & 1 deletion src/server/route.rs → src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::io;
use std::path::Path;
use std::sync::Arc;

use super::serve_dir::ServeDir;
use crate::endpoint::MiddlewareEndpoint;
use crate::fs::ServeDir;
use crate::log;
use crate::utils::BoxFuture;
use crate::{router::Router, Endpoint, Middleware};
Expand Down
7 changes: 1 addition & 6 deletions src/server/mod.rs → src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ use crate::log;
use crate::middleware::{Middleware, Next};
use crate::router::{Router, Selection};
use crate::utils::BoxFuture;
use crate::{Endpoint, Request};

mod route;
mod serve_dir;

pub use route::Route;
use crate::{Endpoint, Request, Route};

/// An HTTP server.
///
Expand Down

0 comments on commit 46aa4e0

Please sign in to comment.