From 42a49a8589755fd35bbe94f2791c10ef74d267d4 Mon Sep 17 00:00:00 2001 From: Jakob Buchgraber Date: Fri, 12 Apr 2024 05:00:17 -0700 Subject: [PATCH] Implement the Error trait for ParseError. This makes it compatible with anyhow. PiperOrigin-RevId: 624137709 --- rust/shared.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/shared.rs b/rust/shared.rs index 5252b1b061..bbb4877cb8 100644 --- a/rust/shared.rs +++ b/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")