Skip to content

Commit

Permalink
fix: the fix for fmtting ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Zk2u committed Sep 18, 2024
1 parent 45bfadb commit a6e2178
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ t:
cargo t

fmt:
rustfmt +nightly **/*.rs
cargo +nightly fmt --all

clippy:
cargo clippy --all-features -- -D warnings
Expand Down
7 changes: 3 additions & 4 deletions utils/html-solver/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
use std::{convert::Infallible, fs, net::SocketAddr, path::Path};

use hyper::{
service::{make_service_fn, service_fn},
Body, Request, Response, Server, StatusCode,
};
use std::{convert::Infallible, fs, net::SocketAddr, path::Path};

async fn serve_file(req: Request<Body>) -> Result<Response<Body>, Infallible> {
let path = match req.uri().path() {
Expand Down Expand Up @@ -36,9 +37,7 @@ async fn serve_file(req: Request<Body>) -> Result<Response<Body>, Infallible> {
async fn main() {
let addr = SocketAddr::from(([127, 0, 0, 1], 3001));

let make_svc = make_service_fn(|_conn| {
async { Ok::<_, Infallible>(service_fn(serve_file)) }
});
let make_svc = make_service_fn(|_conn| async { Ok::<_, Infallible>(service_fn(serve_file)) });

let server = Server::bind(&addr).serve(make_svc);

Expand Down

0 comments on commit a6e2178

Please sign in to comment.