mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Resolve borrowed_box
lint
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
c200997c9a
commit
7850f7e60a
@ -157,10 +157,7 @@ impl Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the associated data.
|
/// Returns the associated data.
|
||||||
///
|
pub fn data(&self) -> &(dyn Send + Sync + Any) {
|
||||||
/// The return type must be borrowed box, otherwise the `downcast_ref` will fail.
|
&*self.data
|
||||||
#[allow(clippy::borrowed_box)]
|
|
||||||
pub fn data(&self) -> &Box<dyn Send + Sync + Any> {
|
|
||||||
&self.data
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user