@@ -175,7 +175,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
175175 let domain = percent_encoding:: percent_encode ( name_or_identity. as_bytes ( ) , encode_set) ;
176176 let mut builder = client. put ( format ! ( "{database_host}/v1/database/{domain}" ) ) ;
177177
178- if !( matches ! ( clear_database, ClearMode :: Always ) ) {
178+ if !( clear_database == ClearMode :: Always ) {
179179 builder = apply_pre_publish_if_needed (
180180 builder,
181181 & client,
@@ -196,7 +196,7 @@ pub async fn exec(mut config: Config, args: &ArgMatches) -> Result<(), anyhow::E
196196 client. post ( format ! ( "{database_host}/v1/database" ) )
197197 } ;
198198
199- if matches ! ( clear_database, ClearMode :: Always ) || matches ! ( clear_database, ClearMode :: OnConflict ) {
199+ if clear_database == ClearMode :: Always || clear_database == ClearMode :: OnConflict {
200200 // Note: `name_or_identity` should be set, because it is `required` in the CLI arg config.
201201 println ! (
202202 "This will DESTROY the current {} module, and ALL corresponding data." ,
@@ -361,7 +361,7 @@ async fn apply_pre_publish_if_needed(
361361 if matches ! ( clear_database, ClearMode :: Never ) {
362362 println ! ( "{}" , manual. reason) ;
363363 println ! ( "Aborting publish due to required manual migration." ) ;
364- anyhow:: bail!( "Publishing aborted by user " ) ;
364+ anyhow:: bail!( "Aborting because publishing would require manual migration or deletion of data and --delete-data was not specified. " ) ;
365365 }
366366 }
367367 PrePublishResult :: AutoMigrate ( auto) => {
0 commit comments