@@ -13,7 +13,7 @@ use crate::result;
1313#[ derive( Debug ) ]
1414pub enum MigrationError {
1515 /// The migration directory wasn't found
16- MigrationDirectoryNotFound ,
16+ MigrationDirectoryNotFound ( PathBuf ) ,
1717 /// Provided migration was in an unknown format
1818 UnknownMigrationFormat ( PathBuf ) ,
1919 /// General system IO error
@@ -32,9 +32,10 @@ impl Error for MigrationError {}
3232impl fmt:: Display for MigrationError {
3333 fn fmt ( & self , f : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
3434 match * self {
35- MigrationError :: MigrationDirectoryNotFound => write ! (
35+ MigrationError :: MigrationDirectoryNotFound ( ref p ) => write ! (
3636 f,
37- "Unable to find migrations directory in this directory or any parent directories."
37+ "Unable to find migrations directory in {:?} or any parent directories." ,
38+ p
3839 ) ,
3940 MigrationError :: UnknownMigrationFormat ( _) => write ! (
4041 f,
@@ -59,8 +60,8 @@ impl PartialEq for MigrationError {
5960 fn eq ( & self , other : & Self ) -> bool {
6061 match ( self , other) {
6162 (
62- & MigrationError :: MigrationDirectoryNotFound ,
63- & MigrationError :: MigrationDirectoryNotFound ,
63+ & MigrationError :: MigrationDirectoryNotFound ( _ ) ,
64+ & MigrationError :: MigrationDirectoryNotFound ( _ ) ,
6465 ) => true ,
6566 (
6667 & MigrationError :: UnknownMigrationFormat ( ref p1) ,
0 commit comments