Skip to content

Commit 6038358

Browse files
committed
Rename ConcreteAppError to InternalAppError
1 parent cd41d7c commit 6038358

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/util/errors.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,19 @@ impl<E: Error + Send + 'static> From<E> for Box<dyn AppError> {
179179
// =============================================================================
180180
// Concrete errors
181181

182-
// TODO: Rename to InternalAppError
183182
#[derive(Debug)]
184-
struct ConcreteAppError {
183+
struct InternalAppError {
185184
description: String,
186185
}
187186

188-
impl fmt::Display for ConcreteAppError {
187+
impl fmt::Display for InternalAppError {
189188
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
190189
write!(f, "{}", self.description)?;
191190
Ok(())
192191
}
193192
}
194193

195-
impl AppError for ConcreteAppError {
194+
impl AppError for InternalAppError {
196195
fn response(&self) -> Option<Response> {
197196
None
198197
}
@@ -262,7 +261,7 @@ impl fmt::Display for BadRequest {
262261
}
263262

264263
pub fn internal<S: ToString + ?Sized>(error: &S) -> Box<dyn AppError> {
265-
Box::new(ConcreteAppError {
264+
Box::new(InternalAppError {
266265
description: error.to_string(),
267266
})
268267
}

0 commit comments

Comments
 (0)