Skip to content

Commit 41c28bd

Browse files
Derive Debug for binder::Accessor
No need for a custom Debug impl. Test: m Bug: none Change-Id: I2b74adafdc205aea50bc439127e4d570380feb09
1 parent 13c2918 commit 41c28bd

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

libs/binder/rust/src/system_only.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,16 @@ use std::os::raw::c_char;
2424

2525
use libc::{sockaddr, sockaddr_un, sockaddr_vm, socklen_t};
2626
use std::sync::Arc;
27-
use std::{fmt, mem, ptr};
27+
use std::{mem, ptr};
2828

2929
/// Rust wrapper around ABinderRpc_Accessor objects for RPC binder service management.
3030
///
3131
/// Dropping the `Accessor` will drop the underlying object and the binder it owns.
32+
#[derive(Debug)]
3233
pub struct Accessor {
3334
accessor: *mut sys::ABinderRpc_Accessor,
3435
}
3536

36-
impl fmt::Debug for Accessor {
37-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
38-
write!(f, "ABinderRpc_Accessor({:p})", self.accessor)
39-
}
40-
}
41-
4237
/// Socket connection info required for libbinder to connect to a service.
4338
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
4439
pub enum ConnectionInfo {

0 commit comments

Comments
 (0)