Skip to content

Commit

Permalink
impl std::fmt::Display for arc::Retained
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Oct 23, 2024
1 parent f7f937c commit 0dbb7c5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cidre/src/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ pub struct Allocated<T: Release + 'static>(&'static mut T);
#[repr(transparent)]
pub struct Retained<T: Release + 'static>(&'static mut T);

impl<T: Release + std::fmt::Display> std::fmt::Display for Retained<T> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}

impl<T: Retain + PartialEq> PartialEq for Retained<T> {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
Expand Down

0 comments on commit 0dbb7c5

Please # to comment.