Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
keep the type_name a &'static str

Co-authored-by: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
  • Loading branch information
jbr and yoshuawuyts authored Aug 7, 2020
1 parent 9aa84f3 commit 7821e22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct Error {
error: anyhow::Error,
status: crate::StatusCode,
type_name: Option<String>,
type_name: Option<&'static str>,
}

impl Error {
Expand All @@ -28,7 +28,7 @@ impl Error {
Self {
status,
error: error.into(),
type_name: Some(std::any::type_name::<E>().to_string()),
type_name: Some(std::any::type_name::<E>()),
}
}

Expand Down

0 comments on commit 7821e22

Please sign in to comment.