Implement Debug for a few Binder Rust types
Test: mmma system/security/keystore2
Change-Id: I6d5413366dd258a1cef887908f98bfb130103943
diff --git a/libs/binder/rust/src/proxy.rs b/libs/binder/rust/src/proxy.rs
index 13e5619..5602c96 100644
--- a/libs/binder/rust/src/proxy.rs
+++ b/libs/binder/rust/src/proxy.rs
@@ -28,6 +28,7 @@
use std::convert::TryInto;
use std::ffi::{c_void, CString};
+use std::fmt;
use std::os::unix::io::AsRawFd;
use std::ptr;
@@ -37,6 +38,12 @@
/// is untyped; typed interface access is implemented by the AIDL compiler.
pub struct SpIBinder(*mut sys::AIBinder);
+impl fmt::Debug for SpIBinder {
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+ f.pad("SpIBinder")
+ }
+}
+
/// # Safety
///
/// An `SpIBinder` is a handle to a C++ IBinder, which is thread-safe