chore: Replace as_any functions with trait upcasting (#28221)
Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
38ec45008c
commit
0b75c13034
13 changed files with 23 additions and 87 deletions
|
@ -1,3 +1,4 @@
|
|||
use std::any::Any;
|
||||
use std::collections::BTreeSet;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
@ -1288,11 +1289,8 @@ impl RemoteServerProjects {
|
|||
cx.notify();
|
||||
}));
|
||||
|
||||
let Some(scroll_handle) = scroll_state
|
||||
.scroll_handle()
|
||||
.as_any()
|
||||
.downcast_ref::<ScrollHandle>()
|
||||
else {
|
||||
let handle = &**scroll_state.scroll_handle() as &dyn Any;
|
||||
let Some(scroll_handle) = handle.downcast_ref::<ScrollHandle>() else {
|
||||
unreachable!()
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue