File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
crates/platform-server/src/models Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -59,15 +59,16 @@ pub enum SubmissionStatus {
5959 Rejected ,
6060}
6161
62- impl ToString for SubmissionStatus {
63- fn to_string ( & self ) -> String {
64- match self {
65- SubmissionStatus :: Pending => "pending" . to_string ( ) ,
66- SubmissionStatus :: Evaluating => "evaluating" . to_string ( ) ,
67- SubmissionStatus :: Completed => "completed" . to_string ( ) ,
68- SubmissionStatus :: Failed => "failed" . to_string ( ) ,
69- SubmissionStatus :: Rejected => "rejected" . to_string ( ) ,
70- }
62+ impl std:: fmt:: Display for SubmissionStatus {
63+ fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
64+ let s = match self {
65+ SubmissionStatus :: Pending => "pending" ,
66+ SubmissionStatus :: Evaluating => "evaluating" ,
67+ SubmissionStatus :: Completed => "completed" ,
68+ SubmissionStatus :: Failed => "failed" ,
69+ SubmissionStatus :: Rejected => "rejected" ,
70+ } ;
71+ write ! ( f, "{}" , s)
7172 }
7273}
7374
You can’t perform that action at this time.
0 commit comments