add AsRef for ResponseValue (#714)

This commit is contained in:
Adam Leventhal 2024-02-06 11:01:58 -08:00 committed by GitHub
parent dc5e1f1840
commit c40c13c711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -216,6 +216,12 @@ impl<T> DerefMut for ResponseValue<T> {
}
}
impl<T> AsRef<T> for ResponseValue<T> {
fn as_ref(&self) -> &T {
&self.inner
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for ResponseValue<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.inner.fmt(f)