Use Utf8PathBuf
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
ad3bcc88de
commit
66e4131bd3
3 changed files with 11 additions and 14 deletions
|
|
@ -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>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue