File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,17 +66,11 @@ pub struct ProjectConfig {
6666
6767impl 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 }
You can’t perform that action at this time.
0 commit comments