diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2025-03-07 02:21:16 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2025-03-07 02:21:16 +0000 |
commit | 1aa49ab2f008099a3de380a7e146a97dedb9873d (patch) | |
tree | eefe8d8261ffa92ff08e0b3d6fc5f9649d502fa9 /src/main.rs | |
parent | Add CHANGELOG entry for healthcheck route (diff) | |
download | miniserve-1aa49ab2f008099a3de380a7e146a97dedb9873d.tar.gz miniserve-1aa49ab2f008099a3de380a7e146a97dedb9873d.zip |
Upgrade to Rust 2024 edition
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/main.rs b/src/main.rs index 688aed1..0248c7b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,18 +5,19 @@ use std::time::Duration; use actix_files::NamedFile; use actix_web::{ - dev::{fn_service, ServiceRequest, ServiceResponse}, + App, HttpRequest, HttpResponse, Responder, + dev::{ServiceRequest, ServiceResponse, fn_service}, guard, - http::{header::ContentType, Method}, - middleware, web, App, HttpRequest, HttpResponse, Responder, + http::{Method, header::ContentType}, + middleware, web, }; use actix_web_httpauth::middleware::HttpAuthentication; use anyhow::Result; -use clap::{crate_version, CommandFactory, Parser}; +use clap::{CommandFactory, Parser, crate_version}; use colored::*; use dav_server::{ - actix::{DavRequest, DavResponse}, DavConfig, DavHandler, DavMethodSet, + actix::{DavRequest, DavResponse}, }; use fast_qr::QRBuilder; use log::{error, warn}; @@ -134,7 +135,9 @@ async fn run(miniserve_config: MiniserveConfig) -> Result<(), StartupError> { return Err(StartupError::NoExplicitPathAndNoTerminal); } - warn!("miniserve has been invoked without an explicit path so it will serve the current directory after a short delay."); + warn!( + "miniserve has been invoked without an explicit path so it will serve the current directory after a short delay." + ); warn!( "Invoke with -h|--help to see options or invoke as `miniserve .` to hide this advice." ); |