mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 08:53:29 +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.
|
||||
///
|
||||
/// The return type must be borrowed box, otherwise the `downcast_ref` will fail.
|
||||
#[allow(clippy::borrowed_box)]
|
||||
pub fn data(&self) -> &Box<dyn Send + Sync + Any> {
|
||||
&self.data
|
||||
pub fn data(&self) -> &(dyn Send + Sync + Any) {
|
||||
&*self.data
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user