Remove `Deref` impl for `arc_anyhow::Error`.
(This forwards things to `anyhow::Error`, but not all their methods will work "nicely" -- in particular, we should probably not be automatically forwarding downcasting, without extra work.)
PiperOrigin-RevId: 460780656
diff --git a/common/arc_anyhow.rs b/common/arc_anyhow.rs
index c5999c2..9187bb5 100644
--- a/common/arc_anyhow.rs
+++ b/common/arc_anyhow.rs
@@ -68,13 +68,13 @@
impl Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
- Display::fmt(&**self, f)
+ Display::fmt(&*self.0, f)
}
}
impl Debug for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
- Debug::fmt(&**self, f)
+ Debug::fmt(&*self.0, f)
}
}
@@ -93,13 +93,6 @@
}
}
-impl std::ops::Deref for Error {
- type Target = anyhow::Error;
- fn deref(&self) -> &Self::Target {
- &*self.0
- }
-}
-
/// Helper type which can be converted to `anyhow::Error` directly, by
/// implementing `std::error::Error`.
///