File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -142,15 +142,22 @@ pub enum ProcessIdParseError {
142142
143143impl std:: fmt:: Display for ProcessIdParseError {
144144 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
145- write ! ( f, "{}" , self . to_string( ) )
145+ write ! (
146+ f,
147+ "{}" ,
148+ match self {
149+ ProcessIdParseError :: TooManyColons => "Too many colons" ,
150+ ProcessIdParseError :: MissingField => "Missing field" ,
151+ }
152+ )
146153 }
147154}
148155
149156impl std:: error:: Error for ProcessIdParseError {
150157 fn description ( & self ) -> & str {
151158 match self {
152- ProcessIdParseError :: TooManyColons => "Too many colons in ProcessId string " ,
153- ProcessIdParseError :: MissingField => "Missing field in ProcessId string " ,
159+ ProcessIdParseError :: TooManyColons => "Too many colons" ,
160+ ProcessIdParseError :: MissingField => "Missing field" ,
154161 }
155162 }
156163}
You can’t perform that action at this time.
0 commit comments