Skip to content

Commit 5aed967

Browse files
tamirdojeda
authored andcommitted
rust_binder: use kernel::fmt
Reduce coupling to implementation details of the formatting machinery by avoiding direct use for `core`'s formatting traits and macros. This backslid in commit eafedbc ("rust_binder: add Rust Binder driver"). Reviewed-by: Alice Ryhl <[email protected]> Signed-off-by: Tamir Duberstein <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent d9252f1 commit 5aed967

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/android/binder/error.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
// Copyright (C) 2025 Google LLC.
44

5+
use kernel::fmt;
56
use kernel::prelude::*;
67

78
use crate::defs::*;
@@ -76,8 +77,8 @@ impl From<kernel::alloc::AllocError> for BinderError {
7677
}
7778
}
7879

79-
impl core::fmt::Debug for BinderError {
80-
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
80+
impl fmt::Debug for BinderError {
81+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8182
match self.reply {
8283
BR_FAILED_REPLY => match self.source.as_ref() {
8384
Some(source) => f

0 commit comments

Comments
 (0)