Skip to content

Commit f8780ee

Browse files
cargo fmt and clippy fix
1 parent 2e77714 commit f8780ee

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

server/src/option.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use clap::{command, value_parser, Arg, ArgGroup, Args, Command, FromArgMatches};
2121

2222
use once_cell::sync::Lazy;
2323
use parquet::basic::{BrotliLevel, GzipLevel, ZstdLevel};
24-
use std::path::PathBuf;
2524
use std::env;
25+
use std::path::PathBuf;
2626
use std::sync::Arc;
2727
use url::Url;
2828

@@ -611,10 +611,10 @@ impl From<Compression> for parquet::basic::Compression {
611611

612612
pub mod validation {
613613
use std::{
614+
env, io,
614615
net::ToSocketAddrs,
615-
path::{PathBuf, Path},
616+
path::{Path, PathBuf},
616617
str::FromStr,
617-
env,io
618618
};
619619

620620
use path_clean::PathClean;
@@ -638,20 +638,20 @@ pub mod validation {
638638
}
639639
pub fn absolute_path(path: impl AsRef<Path>) -> io::Result<PathBuf> {
640640
let path = path.as_ref();
641-
641+
642642
let absolute_path = if path.is_absolute() {
643643
path.to_path_buf()
644644
} else {
645645
env::current_dir()?.join(path)
646-
}.clean();
647-
646+
}
647+
.clean();
648+
648649
Ok(absolute_path)
649650
}
650651

651652
pub fn canonicalize_path(s: &str) -> Result<PathBuf, String> {
652653
let path = PathBuf::from(s);
653-
let absolute_path = absolute_path(&path);
654-
Ok(absolute_path.unwrap())
654+
Ok(absolute_path(path).unwrap())
655655
}
656656

657657
pub fn socket_addr(s: &str) -> Result<String, String> {

0 commit comments

Comments
 (0)