Use Utf8PathBuf

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
xmppftw xmppftw 2024-08-07 11:35:47 +02:00 committed by Maxime “pep” Buquet
commit 66e4131bd3
3 changed files with 11 additions and 14 deletions

View file

@ -28,9 +28,9 @@ use crate::error::Error;
use crate::hook::Hook;
use crate::web::hooks;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use camino::Utf8PathBuf;
use clap::{command, value_parser, Arg};
use hyper::{server::conn::http1, service::service_fn};
use hyper_util::rt::tokio::{TokioIo, TokioTimer};
@ -46,11 +46,11 @@ async fn main() -> Result<!, Error> {
.short('c')
.long("config")
.required(false)
.value_parser(value_parser!(PathBuf)),
.value_parser(value_parser!(Utf8PathBuf)),
)
.get_matches();
let config = Config::from_arg(matches.get_one::<PathBuf>("config"))?;
let config = Config::from_arg(matches.get_one::<Utf8PathBuf>("config"))?;
let (value_tx, mut value_rx) = mpsc::unbounded_channel::<Hook>();