Skip to content

Commit df6a6e3

Browse files
committed
apply format
Signed-off-by: scepter914 <[email protected]>
1 parent f76f679 commit df6a6e3

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/rack.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,11 @@ pub struct ProjectConfig {
6666

6767
impl ProjectConfig {
6868
pub fn is_valid_version(&self, path_from_config_dir: &PathBuf) -> bool {
69-
let project_name = match path_from_config_dir
70-
.parent()
71-
.and_then(|p| p.to_str())
72-
{
69+
let project_name = match path_from_config_dir.parent().and_then(|p| p.to_str()) {
7370
Some(s) => s.to_string(),
7471
None => return false,
7572
};
76-
let version = match path_from_config_dir
77-
.file_name()
78-
.and_then(|n| n.to_str())
79-
{
73+
let version = match path_from_config_dir.file_name().and_then(|n| n.to_str()) {
8074
Some(s) => s.to_string(),
8175
None => return false,
8276
};
@@ -166,8 +160,14 @@ pub fn load_config(path: &std::path::Path) -> (RackConfig, PathBuf) {
166160
match dir.parent() {
167161
Some(parent) => dir = parent.to_path_buf(),
168162
None => {
169-
eprintln!("config.toml not found; reached filesystem root at {:?}", dir);
170-
panic!("config.toml not found in the directory tree starting from {:?}", path);
163+
eprintln!(
164+
"config.toml not found; reached filesystem root at {:?}",
165+
dir
166+
);
167+
panic!(
168+
"config.toml not found in the directory tree starting from {:?}",
169+
path
170+
);
171171
}
172172
}
173173
}

0 commit comments

Comments
 (0)