Clippy warns about a needless borrow in context.rs:
error: this expression creates a reference which is immediately dereferenced by the compiler
--> drivers/android/binder/context.rs:141:18
|
141 | func(&proc);
| ^^^^^ help: change this to: `proc`
Remove the unnecessary borrow to satisfy clippy and improve code
cleanliness. No functional change.
Signed-off-by: Shivam Kalra <shivamklr@cock.li>
---
drivers/android/binder/context.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/android/binder/context.rs b/drivers/android/binder/context.rs
index c7b75efef217f..9cf437c025a20 100644
--- a/drivers/android/binder/context.rs
+++ b/drivers/android/binder/context.rs
@@ -138,7 +138,7 @@ pub(crate) fn for_each_proc<F>(&self, mut func: F)
{
let lock = self.manager.lock();
for proc in &lock.all_procs {
- func(&proc);
+ func(proc);
}
}
base-commit: 96657eb5ab7e231f6333a3fbc674c0451f13f7f1
--
2.43.0