@@ -33,18 +33,20 @@ async fn main() -> std::io::Result<()> {
3333 ) ;
3434
3535 log:: info!(
36- "Git information; repository '{:? }', branch '{:? }', commit '{:? }', tag '{:? }'" ,
37- app_settings. git_repository,
38- app_settings. git_branch,
39- app_settings. git_commit,
40- app_settings. git_tag,
36+ "Git information; repository '{}', branch '{}', commit '{}', tag '{}'" ,
37+ app_settings. git_repository. as_deref ( ) . unwrap_or ( "N/A" ) ,
38+ app_settings. git_branch. as_deref ( ) . unwrap_or ( "N/A" ) ,
39+ app_settings. git_commit. as_deref ( ) . unwrap_or ( "N/A" ) ,
40+ app_settings. git_tag. as_deref ( ) . unwrap_or ( "N/A" ) ,
4141 ) ;
4242
43+ let run_id = app_settings. github_run_id . map ( |v| v. to_string ( ) ) ;
44+ let run_number = app_settings. github_run_number . map ( |v| v. to_string ( ) ) ;
4345 log:: info!(
44- "GitHub information; workflow '{:? }', run id '{:? }', run number '{:? }'" ,
45- app_settings. github_workflow,
46- app_settings . github_run_id ,
47- app_settings . github_run_number ,
46+ "GitHub information; workflow '{}', run id '{}', run number '{}'" ,
47+ app_settings. github_workflow. as_deref ( ) . unwrap_or ( "N/A" ) ,
48+ run_id . as_deref ( ) . unwrap_or ( "N/A" ) ,
49+ run_number . as_deref ( ) . unwrap_or ( "N/A" ) ,
4850 ) ;
4951
5052 tokio:: time:: sleep ( Duration :: from_millis ( 3_000 ) ) . await ;
@@ -79,8 +81,9 @@ impl std::fmt::Display for AppSettings {
7981 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
8082 write ! (
8183 f,
82- "git_repository='{:?}', git_branch='{:?}'" ,
83- self . git_repository, self . git_branch
84+ "git_repository='{}', git_branch='{}'" ,
85+ self . git_repository. as_deref( ) . unwrap_or( "N/A" ) ,
86+ self . git_branch. as_deref( ) . unwrap_or( "N/A" ) ,
8487 )
8588 }
8689}
0 commit comments