Skip to content

Commit

Permalink
Format Rust code using rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 23, 2024
1 parent 78b4aa1 commit 1c3148f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 9 additions & 3 deletions crates/core/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,19 @@ pub trait Handler: Send + Sync + 'static {

/// Wrap to `HoopedHandler`.
#[inline]
fn hooped<H: Handler>(self) -> HoopedHandler where Self: Sized {
fn hooped<H: Handler>(self) -> HoopedHandler
where
Self: Sized,
{
HoopedHandler::new(self)
}

/// Hoop this handler with middleware.
#[inline]
fn hoop<H: Handler>(self, hoop: H) -> HoopedHandler where Self: Sized {
fn hoop<H: Handler>(self, hoop: H) -> HoopedHandler
where
Self: Sized,
{
HoopedHandler::new(self).hoop(hoop)
}

Expand All @@ -157,7 +163,7 @@ pub trait Handler: Send + Sync + 'static {
#[inline]
fn hoop_when<H, F>(self, hoop: H, filter: F) -> HoopedHandler
where
Self: Sized,
Self: Sized,
H: Handler,
F: Fn(&Request, &Depot) -> bool + Send + Sync + 'static,
{
Expand Down
3 changes: 1 addition & 2 deletions crates/serve-static/src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::str::FromStr;
use std::time::SystemTime;

use salvo_core::fs::NamedFile;
use salvo_core::handler::{Handler, };
use salvo_core::handler::Handler;
use salvo_core::http::header::ACCEPT_ENCODING;
use salvo_core::http::{self, HeaderValue, Request, Response, StatusCode, StatusError};
use salvo_core::writing::Text;
Expand Down Expand Up @@ -241,7 +241,6 @@ impl StaticDir {
}
false
}

}
#[derive(Serialize, Deserialize, Debug)]
struct CurrentInfo {
Expand Down

0 comments on commit 1c3148f

Please sign in to comment.