Skip to content

Commit

Permalink
impl From<RenderError> for RenderErrorReason
Browse files Browse the repository at this point in the history
  • Loading branch information
cmrschwarz committed Jun 14, 2024
1 parent 5efb0b6 commit 5039170
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ impl From<RenderErrorReason> for RenderError {
}
}

impl From<RenderError> for RenderErrorReason {
fn from(e: RenderError) -> Self {
*e.reason
}
}

impl RenderError {
#[deprecated(since = "5.0.0", note = "Use RenderErrorReason instead")]
pub fn new<T: AsRef<str>>(desc: T) -> RenderError {
Expand Down

0 comments on commit 5039170

Please sign in to comment.