File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -179,20 +179,19 @@ impl<E: Error + Send + 'static> From<E> for Box<dyn AppError> {
179
179
// =============================================================================
180
180
// Concrete errors
181
181
182
- // TODO: Rename to InternalAppError
183
182
#[ derive( Debug ) ]
184
- struct ConcreteAppError {
183
+ struct InternalAppError {
185
184
description : String ,
186
185
}
187
186
188
- impl fmt:: Display for ConcreteAppError {
187
+ impl fmt:: Display for InternalAppError {
189
188
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
190
189
write ! ( f, "{}" , self . description) ?;
191
190
Ok ( ( ) )
192
191
}
193
192
}
194
193
195
- impl AppError for ConcreteAppError {
194
+ impl AppError for InternalAppError {
196
195
fn response ( & self ) -> Option < Response > {
197
196
None
198
197
}
@@ -262,7 +261,7 @@ impl fmt::Display for BadRequest {
262
261
}
263
262
264
263
pub fn internal < S : ToString + ?Sized > ( error : & S ) -> Box < dyn AppError > {
265
- Box :: new ( ConcreteAppError {
264
+ Box :: new ( InternalAppError {
266
265
description : error. to_string ( ) ,
267
266
} )
268
267
}
You can’t perform that action at this time.
0 commit comments