File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ use thiserror::Error;
33
44pub fn validate_worlds ( worlds : & Vec < PathBuf > ) -> Result < ( ) , ValidateWorldError > {
55 for world in worlds {
6- validate_world ( & world) ?;
6+ validate_world ( world) ?;
77 }
88 Ok ( ( ) )
99}
1010
1111fn validate_world ( world_dir : & Path ) -> Result < ( ) , ValidateWorldError > {
1212 if !world_dir. is_dir ( ) {
13- return Err ( ValidateWorldError :: NotADirectory ) ;
13+ return Err ( ValidateWorldError :: NotADirectory ( world_dir . to_path_buf ( ) ) ) ;
1414 }
1515
1616 if !std:: fs:: exists ( world_dir. join ( "level.dat" ) ) . unwrap_or ( false ) {
@@ -22,8 +22,8 @@ fn validate_world(world_dir: &Path) -> Result<(), ValidateWorldError> {
2222
2323#[ derive( Error , Debug ) ]
2424pub enum ValidateWorldError {
25- #[ error( "the provided world directory is not a directory" ) ]
26- NotADirectory ,
25+ #[ error( "the provided world `{0}` directory is not a directory" ) ]
26+ NotADirectory ( PathBuf ) ,
2727 #[ error( "the provided world directory is missing the `level.dat` file" ) ]
2828 MissingLevelData ,
2929}
You can’t perform that action at this time.
0 commit comments