Resolve `borrowed_box` lint
This commit is contained in:
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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue