diff options
| author | Mica White <botahamec@gmail.com> | 2024-12-26 11:26:39 -0500 |
|---|---|---|
| committer | Mica White <botahamec@gmail.com> | 2024-12-26 12:06:47 -0500 |
| commit | dc16634f4abdb1e830d2749e64b419740702b302 (patch) | |
| tree | eb51ba8293a1c719c7221d546185cfa7062c108c /src/poisonable/error.rs | |
| parent | 096afea6f13692fddbfad0b07e5377cb2e81dd58 (diff) | |
Commenting
Diffstat (limited to 'src/poisonable/error.rs')
| -rw-r--r-- | src/poisonable/error.rs | 12 |
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> { |
