Repository: mxsm/rocketmq-rust (language: rust)

Issue:
[Enhancement⚡️] ArcMut implements Debug trait
### Before Creating the Enhancement Request

- [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.


### Summary

_No response_

### Motivation

_No response_

### Describe the Solution You'd Like

_No response_

### Describe Alternatives You've Considered

_No response_

### Additional Context

_No response_


Discussion / hints:

Fix patch:
diff --git a/rocketmq/src/arc_mut.rs b/rocketmq/src/arc_mut.rs
index d822b853..5153d495 100644
--- a/rocketmq/src/arc_mut.rs
+++ b/rocketmq/src/arc_mut.rs
@@ -17,7 +17,10 @@
 
 #![allow(dead_code)]
 
+use core::fmt;
 use std::cell::SyncUnsafeCell;
+use std::fmt::Debug;
+use std::fmt::Formatter;
 use std::hash::Hash;
 use std::hash::Hasher;
 use std::ops::Deref;
@@ -132,21 +135,21 @@ impl<T: ?Sized> Clone for ArcMut<T> {
     }
 }
 
-impl<T> AsRef<T> for ArcMut<T> {
+impl<T: ?Sized> AsRef<T> for ArcMut<T> {
     #[inline]
     fn as_ref(&self) -> &T {
         unsafe { &*self.inner.get() }
     }
 }
 
-impl<T> AsMut<T> for ArcMut<T> {
+impl<T: ?Sized> AsMut<T> for ArcMut<T> {
     #[inline]
     fn as_mut(&mut self) -> &mut T {
         unsafe { &mut *self.inner.get() }
     }
 }
 
-impl<T> Deref for ArcMut<T> {
+impl<T: ?Sized> Deref for ArcMut<T> {
     type Target = T;
 
     #[inline]
@@ -155,7 +158,7 @@ impl<T> Deref for ArcMut<T> {
     }
 }
 
-impl<T> DerefMut for ArcMut<T> {
+impl<T: ?Sized> DerefMut for ArcMut<T> {
     #[inline]
     fn deref_mut(&mut self) -> &mut Self::Target {
         self.as_mut()
@@ -213,6 +216,12 @@ impl<T> DerefMut for SyncUnsafeCellWrapper<T> {
     }
 }
 
+impl<T: ?Sized + Debug> std::fmt::Debug for ArcMut<T> {
+    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
+        fmt::Debug::fmt(&**self, f)
+    }
+}
+
 #[cfg(test)]
 mod arc_cell_wrapper_tests {
     use std::sync::Arc;


Test patch: