Implement the Error trait for ParseError. This makes it compatible with anyhow.

PiperOrigin-RevId: 624137709
pull/16463/head
Jakob Buchgraber 8 months ago committed by Copybara-Service
parent d172859878
commit 42a49a8589
  1. 2
      rust/shared.rs

@ -68,6 +68,8 @@ mod vtable;
#[derive(Debug, Clone)]
pub struct ParseError;
impl std::error::Error for ParseError {}
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Couldn't deserialize given bytes into a proto")

Loading…
Cancel
Save