summaryrefslogtreecommitdiff
path: root/src/poisonable/error.rs
diff options
context:
space:
mode:
authorMica White <botahamec@gmail.com>2024-12-26 11:26:39 -0500
committerMica White <botahamec@gmail.com>2024-12-26 12:06:47 -0500
commitdc16634f4abdb1e830d2749e64b419740702b302 (patch)
treeeb51ba8293a1c719c7221d546185cfa7062c108c /src/poisonable/error.rs
parent096afea6f13692fddbfad0b07e5377cb2e81dd58 (diff)
Commenting
Diffstat (limited to 'src/poisonable/error.rs')
-rw-r--r--src/poisonable/error.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/poisonable/error.rs b/src/poisonable/error.rs
index f27c6ab..d543294 100644
--- a/src/poisonable/error.rs
+++ b/src/poisonable/error.rs
@@ -16,6 +16,18 @@ impl<Guard> fmt::Display for PoisonError<Guard> {
}
}
+impl<Guard> AsRef<Guard> for PoisonError<Guard> {
+ fn as_ref(&self) -> &Guard {
+ self.get_ref()
+ }
+}
+
+impl<Guard> AsMut<Guard> for PoisonError<Guard> {
+ fn as_mut(&mut self) -> &mut Guard {
+ self.get_mut()
+ }
+}
+
impl<Guard> Error for PoisonError<Guard> {}
impl<Guard> PoisonError<Guard> {